Continuous Memory Player

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm trying to create a continuous memory player (for lack of a better description). Here's what I'm doing. Create a memory player with looping enabled. When it gets to EOF the callback method is invoked. I update the memory with new audio data and return true. This basically works, however, I keep getting a little snippet of the previous audio data. It's as if the callback is invoked slightly after the rewind happens. I assumed that execution would be: play memory, EOF callback, rewind memory, play memory, etc. That doesn't seem to be the case. What am I getting wrong here?

I also tried disabling looping, but I couldn't figure out how to manually rewind the memory and transmit again. Destroying the memory player, re-creating it, and pointing at the same but updated buffer seems heavy handed.

I've essentially copied and pasted the AudioMediaPlayer class and used the memory player methods under the hood. That is, https://www.pjsip.org/pjmedia/docs/html/group__PJMEDIA__MEM__PLAYER.htm 

Should I be approaching this differently or...?

Thanks,
-brock

 
_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux