audio

How to get name of directory having audio files using mediastore.audio in android

岁酱吖の 提交于 2021-01-29 11:08:37
问题 I'm working on audio and video player. I got all video's folder name using mediastore.video.media.bucket_display_name , it's working perfectly with video files but when i uses mediastore.audio.media.bucket_display_name it shows error. Can anybody help me to get name of folders containing audio files. I need to do this using cursor. And i got this error: "no such column: bucket_display_name (Sqlite code 1): , while compiling: SELECT bucket_display_name FROM audio" 回答1: Use below code to get

ffmpeg being inprecise when trimming mp3 files

▼魔方 西西 提交于 2021-01-29 10:32:04
问题 I want to use ffmpeg to trim some mp3s without re-encoding. The command I used was ffmpeg -i "inputfile.mp3" -t 00:00:12.414 -c copy out.mp3 However, out.mp3 has a length of 12.460s, and when I load the file in Audacity I can see that it was cut at the wrong spot, and not at 12.414s. Why is this? I googled a bit and tried some other commands like ffmpeg -i "inputfile.mp3" -ss 0 -to 00:00:12.414 -c copy out.mp3 (which interestingly results in a different length of 12.434s) but could never get

Detect Matching Sounds in Audio Stream

时光总嘲笑我的痴心妄想 提交于 2021-01-29 10:26:37
问题 I'd like to compare the audio output from a PC game to known audio files (*.mp3 for example). If the audio stream contains the recorded audio, I'd like to measure the amplitude of the matching audio in the left/right stereo channels. The goal is to determine the direction and distance of the sound (footsteps/gunshots). It would also be a bonus to amplify the matching audio without affecting the rest of the audio stream. Are there any open-source projects that would be a good reference? Any

ffmpeg amerge Error while filtering: Cannot allocate memory

泪湿孤枕 提交于 2021-01-29 09:23:54
问题 This seems to be a recurring problem, as seen here: ffmpeg Error while filtering: Cannot allocate memory . I ask this only because that question has no answer. I get a memory error every time I try to use amerge to combine music and a video (with audio). I am at a loss as to how to get around this, so if there are any other command line alternatives that do the same thing (combining audio with video, merging the new audio and the current audio on the video) any suggestions would be much

How to read from - “unsigned char const *” when use Media Foundation?

寵の児 提交于 2021-01-29 08:42:56
问题 I have such an implementation void coAudioPlayerSampleGrabber::test(SoundDataType dataType, unsigned char const * pData, int64_t dataLen) { HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL, 0); IMFSourceReader *pReader = NULL; IMFByteStream * spByteStream = NULL; HRESULT hr = S_OK; // Initialize the COM library. hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE); // Initialize the Media Foundation platform. if (SUCCEEDED(hr)) { hr = MFStartup(MF

AudioRecord while also playing audio - accessing output playback data

放肆的年华 提交于 2021-01-29 08:08:23
问题 I'm messing around in my app with a custom model for speech commands - I have it working fine recording and processing input audio from an AudioRecord, and I give feedback to the user through text to speech. One issue I have is that I'd like this to work even when audio is playing - either through my own text to speech or through something else playing in the background (music for instance). I realize this is going to be a non trivial problem, but if I could get access in some way to the

How to listen to audio output by application

落花浮王杯 提交于 2021-01-29 07:27:31
问题 Background I'm working on a music player, and want any sort of audio visualizer to be part of it. I've already made a previous post specifically targeting python-vlc, but I guess not too many people know about it. Here is the post in question: How to get audio samples from python-VLC What I need I need a way to listen to audio output, preferably by application although it is not completely necessary. It must be a python module. What I found A bunch of tutorials regarding audio input from the

Detecting bpm of audio input using javascript?

谁都会走 提交于 2021-01-29 07:20:13
问题 I'm trying to put together an audio input + beatdetektor example so I could calculate the BPM of a track playing through my line in ( or even microphone input ). Unfortunately, I didn't understand exactly how the "time" parameter from the "process" method is supposed to be used ( specially in that case, where I don't necessarily know when the track changes, etc ). Here is some code I put together trying to solve this puzzle using the lovely p5.js library, please let me know how I could tweak

flutter package audio_service: Is there a way to remove the notification from the ui without stopping the service?

你说的曾经没有我的故事 提交于 2021-01-29 06:01:10
问题 Without stopping the service, my app sometimes needs to remove the notification when the music stops playing (of course, the notification needs to be displayed again when some other music playing). Is there a soluation? Because the service switch consumes too much 来源: https://stackoverflow.com/questions/64712447/flutter-package-audio-service-is-there-a-way-to-remove-the-notification-from-th

How to assign identifiers to all HTML elements of a particular type?

你。 提交于 2021-01-29 05:20:43
问题 My site embeds posts from an RSS feed, and some of these posts contain <audio> elements. In a separate JS file, I want to be able to assign each <audio> element on the page a unique identifier based on their src attribute so that they can be handled separately. Of course, I don't know in advance how many <audio> elements there will be, nor what the names of their src attributes will be. So basically I will have something like this: <audio src="1.mp3"></audio> <audio src="2.mp3"></audio>