Discussion:
[Audiere-users] Does Audiere also play audio streams from memory?
Markus Luttenberger
2009-12-14 12:02:41 UTC
Permalink
Hey,


I found some nice examples of Audiere at
http://gpwiki.org/index.php/Audiere:Tutorials:Introduction but I don't
know if it's also possible to play audio data from a memory position,
ie. without giving a file pointer? I have my own audio container and
additionally the data is G.711 encoded so I cannot give a file pointer.

I also need to play multiple audio streams *at the same time*. These are
mono speech recordings and have a lot of silence so there should not be
an acoustic problem playing them simultaneously. Does Audiere provide a
possibility to play multiple streams? Or do I need to implement my own
mixer (I've read that the streams just need to be added together...)?


greetings..
..Markus
Brian Robb
2009-12-14 18:21:22 UTC
Permalink
I can't recall whether it has built-in support to do this
But I did have it playing ogg's via http ages ago so what you want to do should be possible

(I did something like read data from a http stream - put the data into a byte array and get audiere to play the byte array.)

So basically my code implemented audiere::StreamingFile interface like so:

class CHttpStreamingFile : public audiere::RefImplementation<audiere::StreamingFile>
{
int ADR_CALL read(void* buffer, int size)
{
int num_bytes_read = 0;


// read 'size' bytes of data from your container and place it into 'buffer'

// then return the number of bytes read, which should be size or less
return num_bytes_read;
}

bool ADR_CALL seek(int position, SeekMode mode)
{
bool can_seek = false;
return can_seek;
}

int ADR_CALL write(const void* buffer, int size)
{
return 0;
}

int ADR_CALL tell()
{
return 0;
}
}

- So you might be able to do something similiar?
Date: Mon, 14 Dec 2009 13:02:41 +0100
Subject: [Audiere-users] Does Audiere also play audio streams from memory?
Hey,
I found some nice examples of Audiere at
http://gpwiki.org/index.php/Audiere:Tutorials:Introduction but I don't
know if it's also possible to play audio data from a memory position,
ie. without giving a file pointer? I have my own audio container and
additionally the data is G.711 encoded so I cannot give a file pointer.
I also need to play multiple audio streams *at the same time*. These are
mono speech recordings and have a lot of silence so there should not be
an acoustic problem playing them simultaneously. Does Audiere provide a
possibility to play multiple streams? Or do I need to implement my own
mixer (I've read that the streams just need to be added together...)?
greetings..
..Markus
------------------------------------------------------------------------------
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Audiere-users mailing list
https://lists.sourceforge.net/lists/listinfo/audiere-users
_________________________________________________________________
Got more than one Hotmail account? Save time by linking them together
http://clk.atdmt.com/UKM/go/186394591/direct/01/
Markus Luttenberger
2009-12-15 10:28:12 UTC
Permalink
Post by Brian Robb
- So you might be able to do something similiar?
Thanks, I'll have a look at that!



greetings..
..Markus

Loading...