×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    May 2005
    Posts
    2

    looping sounds with CMdaAudioPlayerUtility

    Hello I'm trying to get CMdaAudioPlayerUtility::SetRepeats() play repeatedly a wav or mp3 sample but there is a delay between the repeats, something like half a second... This is a short sample music, I need it to loop perfectly !

    I also tried the callback method MapcPlayComplete from MMdaAudioPlayerCallback (when the play is done, I restart the sound) but I also have a gap between the end of the sound and the start of the new one...

    Did anybody manage to loop correctly a sound ? Will I have to try CMdaAudioOutputStream or will the problem be the same ?

    Thanks in advance.

  2. #2
    Registered User
    Join Date
    Nov 2010
    Posts
    2

    Re: looping sounds with CMdaAudioPlayerUtility

    I am getting the same problem as you are getting. The problem with CMdaAudioPlayerUtility is that it loads the file every time it loops the music track that you want to play. That is why you have this noticeable long delay. The bigger the music file is the longer the delay is. I have got music to loop properly by using the SoundMixer example that Nokia created in the sample code section. However the looping works only for sounds that is 30 seconds in duration. Any music files longer than 30 seconds will get cut off down to about 10 seconds or less and they repeat based on these cut down versions.

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,568

    Re: looping sounds with CMdaAudioPlayerUtility

    It is not sure that Yubaba will answer after ~6 years, but the stream-based solution should be fine. SoundMixer example may have some internal limitations in order to keep it simple, generally CMdaAudioOutputStream plays whatever you feed into it. Any necessary repeats are handled in your code, via simply transferring the complete audio data again and again. So there are no mystical limits and caps about lengths on the API side.

Posting Permissions

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