|
From: Klaus R. <kla...@rz...> - 2008-10-02 09:03:27
|
Hi,
sound was one of the not so nice places of MING. Mostly because of a lot
codec related code distributed over several files. SWFSound and
SWFSoundStream did not share codec related code: e.g. uncompressed sound
(aka WAVE / PCM) was supported be SWFSound but not for SWFSoundStream,
SWFSoundStreams support FLV audio while SWFSound does not, etc...
Therefore I created a new SWFSoundInput object and one instance for each
supported sound codec. Such an object holds function pointers for common
tasks (like getSampleSize, skip, rewind, write, ...) to codec specific
implementations, such that SWFSound and SWFSoundStream can share now all
codec related tasks. In other words, if a codec is implemented properly,
it works on any sound object.
Also the newSWFSound() interface can be simplified. For WAV, FLV and MP3
input, pass 0 as flags and let MING determine the sound type and its
properties.
Attached is a patch for testing and reviewing. I'll commit it to CVS as
soon as we have separate branches for stable and dev code.
Cheers
Klaus
|