Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > irrKlang
C Recording audio with IrrKlang

zbyhu
Guest
Quote
2015-09-15 23:15:25

Hi all, Is possible to record audio with Irrklang on C? i try do it, and on thread i get sample data,but is always zero-size, is possible to do this?
i wrote somethink like this
void IrrKlangRecv()
{
while (true)
{
if (engine == null || recorder == null) { Thread.Sleep(10); continue; }
if (recorder.AudioFormat.SampleDataSize <= 0) {continue;}
Debug.Print("DataS: {0}", recorder.AudioFormat.SampleDataSize);
Thread.Sleep(10);
if (FileChkBox.Checked && recorder != null && writer != null) writer.Write(recorder.RecordedAudioData, 0, recorder.AudioFormat.SampleDataSize);
recorder.ClearRecordedAudioDataBuffer();
// bufferedWaveProvider.AddSamples(recorder.RecordedAudioData, 0, recorder.RecordedAudioData.Length);
// meteringSampleProvider.Read(recorder.RecordedAudioData, 0, recorder.RecordedAudioData.Length);
}

}


niko
Moderator
Quote
2015-09-16 05:10:10

Yes, that one will always be 0, this is only for getting the audio format. If you are finished recording, just do a StopRecordingAudio(). Then, what was recoded is in RecordedAudioData .


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internat?onal" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact