Playing raw pcm samples with audio Player?
#1
Suppose that you are continuously receiving PCM audio samples in a steady flow. What would be the easiest way to play this stream with the xbmc audio player?

I'm thinking of setting up a local socket that I feed with the pcm data (which the Player could then open for playback), but I'm not sure which format to use. Any recommendations?
Reply
#2
d00chris,

AFAIK, xbmc can't play pcm directly from a socket. If you're willing to use C++, then the strategy would be to create a file for xbmc's vfs (virtual file system) that mimics a WAV file and echos the data from the socket to the audio engine.

Good news, most of the work has been done for you Smile About a month ago, I took this exact approach to play pcm data from a mic (http://forum.xbmc.org/showthread.php?p=888164). If you want a good starting ground, my code is here: https://github.com/garbear/xbmc/tree/device.

Regards,
Garrett
Reply
#3
The source of audio I'm trying to play back is libspotify, and since it only provides raw pcm samples I'm looking for an easy way of playing this.

Would the RTSP network protocol be a viable solution (fed from a socket hosted locally)?
Reply
#4
XBMC's libavformat supports rtsp. This might be your solution.
Reply

Logout Mark Read Team Forum Stats Members Help
Playing raw pcm samples with audio Player?0