≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Can recorder.RecordedAudioData be accessed from memory?
Posted by:
(you are not logged in)
Enter the missing letter in: "Internationa?"
(you are not logged in)
Text:
[quote][b]tr32[/b] wrote: I am trying to adapt your Memory Playback (C) example to capture recorded audio in an array, do something with that array somewhere else, and use the array later for playback. Recording and playback with the recorder from a mic etc works fine. I declare engine0 = new ISoundEngine(); engine1 = new ISoundEngine(); recorder0 = new IAudioRecorder(engine0); recorder1 = new IAudioRecorder(engine1); under the class, then after recording and having stopped it - recorder0.AddSoundSourceFromRecordedAudio(rec_sound0); (which I also use for playback successfully) then - SoundDataArray1 = new byte[recorder0.RecordedAudioData.Length]; Array.Copy(recorder0.RecordedAudioData, SoundDataArray1, recorder0.RecordedAudioData.Length); soundsource1 = engine1.AddSoundSourceFromMemory(SoundDataArray1, rec_sound1); sound1 = engine1.Play2D(soundsource1, loop_flag, false, false); But there is no sound, and - if (sound1 == null) { System.Windows.Forms.MessageBox.Show("No sound!"); } produces the above message. However, recorder0.RecordedAudioData can be used like a normal array, to get the length, to copy it to another array, writing the content of SoundDataArray1 to a file is no problem. Not using a separate engine1 doesn't help. Replacing soundsource1 = engine1.AddSoundSourceFromMemory(SoundDataArray1, rec_sound1); with soundsource1 = engine1.AddSoundSourceFromMemory(recorder0.RecordedAudioData, rec_sound1); doesn't help either. engine1.Play2D(rec_sound1, loop_flag); as in your example doesn't work either. As soon as I replace SoundDataArray1 with SoundDataArray (the declared array in your example) it is played back. But as a soundsource it is not recognised. What am I doing wrong? I greatly appreciate any input. I'm using Win 7, VS Express 2012, C, irrKlang-32bit-1.5.0.[/quote]
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