audio-recording

How to Change Speaker Configuration in Windows in C#?

懵懂的女人 提交于 2019-12-12 03:53:15
问题 I am aware of this old thread: What APIs exist?, but it really didn't answer the question. And it has been a number of years. Yes I am using the NAudio.CoreAudioApi But I'm not finding any useful information. MMDevice.Properties is readonly. Is there a way to do this programmatically in C#? I'm no longer sure. You can also find the channels with: AudioEndpointVolumeChannels, but it only allows Channels.count. Another solution I thought of is with some sort of 'Macro' that changes with mouse

Get microphone input using Audio Queue in Swift 3

流过昼夜 提交于 2019-12-12 03:27:48
问题 I am developing an app that records voice via built-in microphone and sends it to a server live. So I need to get the byte stream from the microphone while recording. After googling and stack-overflowing for quite a while, I think I figured out how it should work, but it does not. I think using Audio Queues might be the way to go. Here is what I tried so far: func test() { func callback(_ a :UnsafeMutableRawPointer?, _ b : AudioQueueRef, _ c :AudioQueueBufferRef, _ d :UnsafePointer

Naudio Recording and playing audio

大憨熊 提交于 2019-12-12 01:56:20
问题 I'm using NAudio 1.7 after i gave up on WaveIn p/invoke... anyway, i'm making a VoIP application and the sample code i found used WaveFileWriter to output to disk, i don't want that, so i used the memoryStream overload instead. The problem is when i try to play the stream after i stop the recording with the SoundPlayer class, it just doesn't play and continues the code, but if i save it as shown below, i can play it in VLC, but if i try to load it from the file itself, it doesn't play either,

How add AVCaptureDeviceInput to AVCaptureSession from bluetooth device?

自古美人都是妖i 提交于 2019-12-12 01:47:02
问题 I need to record a video with AVCaptureSession in an iOS app. When I add AVCaptureDeviceInput to my current AVCaptureSession , it always adds the iphone microphone. I have the bluetooth microphone connected to the device. But it is not recording from the external microphone. I'm doing this: - (BOOL)prepareAudioSession { // deactivate session BOOL success = [[AVAudioSession sharedInstance] setActive:NO error: nil]; if (!success) { NSLog(@"deactivationError"); } // Bluetooth support enable

How do I get most accurate audio frequency data possible from real time FFT on Tizen?

帅比萌擦擦* 提交于 2019-12-11 20:40:48
问题 currently i m working on the Tizen IDE. I had read the input data from the microPhone and apply the FFT on it... but everytime i gets the nan output. here is my code.. ShortBuffer *pBuffer1 = pData->AsShortBufferN(); fft = new KissFFT(BUFFER_SIZE); std::vector<short> input(pBuffer1->GetPointer(), pBuffer1->GetPointer() + BUFFER_SIZE); // this contains audio data std::vector<float> specturm(BUFFER_SIZE); fft->spectrum(input, specturm); applying FFT.. void KissFFT::spectrum(KissFFTO* fft, std:

Android store recorded audio using input text?

亡梦爱人 提交于 2019-12-11 18:37:09
问题 I have an app that records and stores the audio on the sdcard. It records and saves it in the right place, but saves it as android.widget.EditText@random number. I was using an EditText to get the filename. Does anyone know how I can let the user enter some text and save the file as that. I thought I was onto something with the code below, but no... try { //Set user input as filename String filename = getInput.toString(); // set the storage directory to SDcard File storageDir = new File

How to overwrite a specific chunk in a byte array

不问归期 提交于 2019-12-11 18:14:12
问题 Given a bytearray and a new bytearray of which i need to overwrite its content on the original bytearray but starting from a specific position/offset (A) as shown in the image below(we can say B is the length of the new Array). Also handling the new length if the overwriting exceeds the actual length of the original array. (this is needed for .WAV file overwriting in different positions). here is what i have tried so far but no luck. public byte[] ByteArrayAppender(byte[] firstData, byte[]

NAudio - Change pitch of buffered microphone audio and send to Virtual Audio Cable

别说谁变了你拦得住时间么 提交于 2019-12-11 16:47:43
问题 I decided to have a go at creating a sound board for use with Discord (or similar software) using NAudio and a Virtual Audio Cable. I was able to 'inject' the audio from the microphone to the audio cable so I could play sound files and mic audio to Discord by selecting the virtual audio cable as the input device in Discord. For fun I thought I would see if I could modify the mic audio to make it 'squeaky' or 'deep'. So I started looking into modifying the pitch of the audio. I discovered that

need help understanding data section of wav file

烈酒焚心 提交于 2019-12-11 13:59:10
问题 I was reading THIS TUTORIAL on wav files and I have some confusions. Suppose I use PCM_16_BIT as my encoding format. So this should mean each of my sound samples need 16 bits to represent them shouldn't it? But in this tutorial, the second figure shows 4 bytes as one sample. Why is that? I suppose because it is trying to show the format for a stereo recorded wav file, but what if I have a mono recorded wav file? Are the left and right channel values equal in this case, or one of the channel

CSCore loopback recording when muted

天大地大妈咪最大 提交于 2019-12-11 13:25:30
问题 I'm using CSCore.WasapiLoopbackCapture to record system sound. But when there is no sound in system, it doesn't record at all! For instance, while playing music and recording it, the output file's duration is less than the track's. I want it to continue recording even when there is no sound in the system but I didn't find any property to control this behavior. Here is my code snippet: WasapiCapture waveLoop = new WasapiLoopbackCapture(); waveLoop.Initialize(); waveLoop.DataAvailable +=