Results 1 to 8 of 8

Thread: Playback options for network Data.

  1. #1

    Playback options for network Data.

    Hi Everyone

    i'm hoping for some ideas here.

    I've created an application that records audio data and sends this to another machine for playback. The problem is what method to use to play back the data on the other end. So far i have managed to take this data and save it to a audio file to prove it works, but i need to play the data in real time ( as it arrives).

    I'm new to FMOD so I was wondering if anyone has any suggestions :?:

    The added complication is that I could have many clients sending data and this would all need to be played (mixed?)

    Any thoughts or suggestions would be helpful.
    <A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
    <br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
    <br /></A>

  2. #2

    Playback options for network Data.

    Check out the stream2 sample that comes with FMOD. It demonstrates a stream with a user callback to populate the stream data. Based on this example, you could receive the data over the network, buffer it, and fill the stream buffer in the callback when required.

  3. #3

    Playback options for network Data.

    Thanks Sly, I'll check out that example.

    Any ideas on how to handle data fro different machines? Should each piece of data be placed in it's own stream or should I merge the data, or just play it as it comes in ??
    <A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
    <br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
    <br /></A>

  4. #4

    Playback options for network Data.

    Create multiple streams and FMOD will handle the mixing.

  5. #5

    Playback options for network Data.

    ok, I'll look at that.

    one question about streams. the data I'm getting from the remote system is not going to be arriving at a constant rate. My under standing of a Stream it that the callback will be called when the stream needs more data. If I return False in the call back if no data is available will that stop the playback? If so that it should be an easy task to stop and start the plaback as the data arrives.

    Any suggestions on the buffering of the data? Actually, I just had a thought if I store the incomming daa packes in a queue the stream can just grab the top packed and process that, and stop the stream if no packets are in the queue... that way the memory useage of the buffer should be kept to a minimum....
    <A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
    <br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
    <br /></A>

  6. #6

    Playback options for network Data.

    That should work fine. Buffer the data yourself and then give it to the stream as the stream requests it. If you run out of data, you could just supply a whole load of blank data to the stream so you get no sound, but the stream is still playing.

  7. #7

    Playback options for network Data.

    Well the good news is that the queue idea worked ( have a weird AV that occurs during playback, which I can't trace, but I'll nail it )

    What I did was paused the stream to start with until data arrives when i unpause it. When the queue is empty I just pause the stream, until more data arrives.

    Thanks for your feedback, it really helped
    <A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
    <br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
    <br /></A>

  8. #8

    Playback options for network Data.

    Excellent stuff.

Bookmarks

Posting Permissions

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