×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Jul 2009
    Posts
    99

    CMdaAudioOutputStream on end of streaming

    I use CMdaAudioOutputStream for my audio. I need to know when I can call Stop to stream.
    I write to stream with chunks of size 4096 (or less) and on timer events I look on stream position in bytes - GetBytes(). Comparing with bytes totally passed to audio device I can see that all my streams have been played and I can close streaming. What I see is stream playing is stuck and never comes to end. From stream to stream bytes difference is in range form 100b to 10kb. So I have artifacts on my sound.
    I looked at implementation of working with audio streaming in SDL - they use empty buffer (256 bytes of zeros) to write to stream when there is no data for streaming. Using this approach gives me continuous stream playing but different artifacts on end of stream still appear.
    Why it is happening when stream playing stops (all buffers are written to device but not all of them rendered) when you stop calling WriteL?
    Last edited by ganenko; 2010-01-21 at 08:45.

  2. #2
    Regular Contributor
    Join Date
    Jul 2009
    Posts
    99

    Re: CMdaAudioOutputStream on end of streaming

    I found that writing to stream with chunks of duration 80ms leads to stable flushing to device all of those chunks I gave. Where from this number appears? Who know?
    By the way, are nokia staff members reading this forum?

  3. #3
    Registered User
    Join Date
    Oct 2005
    Posts
    107

    Re: CMdaAudioOutputStream on end of streaming

    Hi ganenko,

    How did you calculate the 80ms duration and the relationship to bytes?

    Which version are you using and which phones? I used N86 and N96, but it works on N96 and not on N86. I am trying to decode AAC. Any help would be appreciated.

    Thanks
    Ramesh

  4. #4
    Regular Contributor
    Join Date
    Jul 2009
    Posts
    99

    Re: CMdaAudioOutputStream on end of streaming

    Phones N97, 5800, X6.
    I wrote buffers with different lengths to device and looked at Position() of stream. Every change of position was multiplier of 80ms. And first flush of written buffers was on 80ms.
    I discovered, that this principle is not working on I8910. So, this magic number is hardware specific. It is working very different way on other hardware by the way. I8910 audio device flushes not by time, but by some other inner logic. It is not worth it to examine it.
    I found, that there is good principle of working - on end of stream continue writing silence buffers to audio device, until flush position not reaches total bytes we wrote to device.

Similar Threads

  1. Streaming EDGE clip in GPRS coverage
    By zivs in forum Streaming and Video
    Replies: 0
    Last Post: 2006-08-22, 17:22
  2. Problem: 10 Bluetooth Ports simultaneously
    By Alco Fresh in forum Symbian
    Replies: 1
    Last Post: 2006-07-03, 12:05
  3. Series 60 SDK Appwizard on windows xp
    By moonjoor in forum Symbian Tools & SDKs
    Replies: 15
    Last Post: 2003-12-24, 11:22
  4. SMS Msg using VB Application
    By gurup83 in forum General Messaging
    Replies: 2
    Last Post: 2002-07-11, 04:48

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×