I am using CMdaAudioOutputStream to stream audio data and it works fine if I call CMdaAudioOutputStream::WriteL() with a descriptor whose length is > 32000. If I call WriteL() with a descriptor whose length is 10976 then MaoscBufferCopied() is called but the data is not played and MaoscPlayComplete() is not called.
Does anyone have an idea how it is possible to stream also a small amount of data (without using AudioPlayer) ?
I am using this method with only a 512 sample buffer and it works fine.
I based my work off of this article: http://newlc.com/article.php3?id_article=113
Hope this helps you, too.
Alex
Very strange... maybe you could post a code snippet? I never had problems on the hardware...
If you like you can download my test case off my website so you can hear for yourself that it works: www.hipergames.com then click on symbian game engine.
You need to install it on the main phone memory (not MMC).
I am using 512 sample buffer in here and it works fine.
The only thing I could think is that your other code takes too long to execute, before giving the sound a chance to run. Try taking things that take long out and run it again.
Alex
Finally I got it working. In contrast to the example in http://newlc.com/article.php3?id_article=113 I used a sample rate of 8 kHz. And with 8kHz the buffer has to be 256 samples.
After all I got the impression that streaming audio in Series 60 is a very sensitive thing. The buffer passed to WriteL does not have to cover more than 32 ms of audio, but it works again with 3000ms. Very strange.
I had exactly the same problem on the phone. Samples less than "about 10,000 samples" would fail when using 8khz. I got round this by modifying the code so that it would load a sample then PAD it with 0's to a 'min size' ! At the same time I did like the newlc example and used 8bit samples which got upsized to 16bit.
I checekd the article on NewLC on output streaming. I want to develop a voice streaming application. Basically I want to record and store the voice in a file and then play it back. Can you please guide me with some code snippets.
after having a lot of problems with this topic I finally merge the 2 sound files in memory and play them with CMdaAudioPlayerUtility. This class can also play files from memory.