[Top][All Lists]

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

[Gnash-dev] Re: sound_handler.h

From: strk
Subject: [Gnash-dev] Re: sound_handler.h
Date: Thu, 30 Oct 2008 16:35:37 +0100

On Thu, Oct 30, 2008 at 04:07:27PM +0100, Klaus Rechert wrote:

> I do not understand why to use int32_t / int16_t types for the output 
> sink. Makes everything complicated (IMHO).
> I'd use (uint8_t *) as "raw data".
> int fetchSamples(boost::int8_t* to, unsigned int *nSamples);
> You might want to know the size of the data you have fetched as a return 
> value?
> You might also want to know how many samples you fetched (might fail or 
> not enough samples present)?

I want to actually fetch a given amount of samples, to make
it easier to tell how much "time" we're fetching out of it
(assuming the nominal rate is 44100).

The idea is we'd basically manually fetch the result of mixing 
from the testing hosting application, so match with the time
the testing application wants to pretend elapsed.
So, to simulate a run of 1 second, the testing application will
fetch 44100 samples (how big each sample I'm still trying to figure ;)

> >>I also propose to move
> >>
> >>virtual unsigned int get_duration(int sound_handle) = 0;
> >>virtual unsigned int tell(int sound_handle) = 0;
> >>virtual void reset() = 0;
> >>
> >>to the InputStream class.
> >>    
> >
> >Uhm.. not sure abou this.
> >My plan was to use InputStream for both embedded and streaming sounds...
> >  
> Right. But e.g. getDuration() and tell() i would think of these values 
> as per stream source...

Cold be, but for getDuration might be unknown.
Shouldnt' be too work to add any additional interface later, as we
see a need for it.

For now I'd like to make what we have still work, but with better


reply via email to

[Prev in Thread] Current Thread [Next in Thread]