gnash-dev
[Top][All Lists]
Advanced

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

[Gnash-dev] Re: sound_handler.h


From: Klaus Rechert
Subject: [Gnash-dev] Re: sound_handler.h
Date: Thu, 30 Oct 2008 16:07:27 +0100
User-agent: Thunderbird 2.0.0.17 (X11/20080925)

Hi,
The only difference is that instead of fetching 32bit numebrs we
fetch 16bit ones and require to fetch in couples.

h, so you suggest we refer to "sample pairs" when we count them ?
Should the interface be something like this then:

        void fetchSamples(boost::int32_t* to, unsigned int nSamples)=0;

If so, isn't thre a need to specify byte orders for those 32bit numbers ?
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 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...

Cheers
   Klaus




reply via email to

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