second attempt,
a few days ago i talk about libsndfile and flac and ogg support.

i think we have to add ogg support and remove the obsolete flac file reader.
also we can add ogg, flac, .... song export formats.
second step is to try fixed export samplerates. in moment diskwriterdriver 
starts witch
audiodriver samplerate. this is no problem, but sometimes the files hydrogen 
have export don't
fit in length. maybe this caused because some hardware dont get the ideal 
samplerate eg 44100, 48000, .... often this is something like 44099(my on-board 
sound card use this rate) or similar.

so i think we start the driver with settings users can do.
this mean export song with

rate in hz
44100
48000
96000
192000

depth in bit
8
16
24
32
32 float
64 long

and choose between 
waf
ogg 
flac
aiff
au
...
...

templates are possible. like 
cd, adat, lofi, hifi, dont know, what ever.

available format options with libsnd file.
   SF_FORMAT_WAV          = 0x010000,     /* Microsoft WAV format (little 
endian). */
          SF_FORMAT_AIFF         = 0x020000,     /* Apple/SGI AIFF format (big 
endian). */
          SF_FORMAT_AU           = 0x030000,     /* Sun/NeXT AU format (big 
endian). */
          SF_FORMAT_RAW          = 0x040000,     /* RAW PCM data. */
          SF_FORMAT_PAF          = 0x050000,     /* Ensoniq PARIS file format. 
*/
          SF_FORMAT_SVX          = 0x060000,     /* Amiga IFF / SVX8 / SV16 
format. */
          SF_FORMAT_NIST         = 0x070000,     /* Sphere NIST format. */
          SF_FORMAT_VOC          = 0x080000,     /* VOC files. */
          SF_FORMAT_IRCAM        = 0x0A0000,     /* Berkeley/IRCAM/CARL */
          SF_FORMAT_W64          = 0x0B0000,     /* Sonic Foundry's 64 bit 
RIFF/WAV */
          SF_FORMAT_MAT4         = 0x0C0000,     /* Matlab (tm) V4.2 / GNU 
Octave 2.0 */
          SF_FORMAT_MAT5         = 0x0D0000,     /* Matlab (tm) V5.0 / GNU 
Octave 2.1 */
          SF_FORMAT_PVF          = 0x0E0000,     /* Portable Voice Format */
          SF_FORMAT_XI           = 0x0F0000,     /* Fasttracker 2 Extended 
Instrument */
          SF_FORMAT_HTK          = 0x100000,     /* HMM Tool Kit format */
          SF_FORMAT_SDS          = 0x110000,     /* Midi Sample Dump Standard */
          SF_FORMAT_AVR          = 0x120000,     /* Audio Visual Research */
          SF_FORMAT_WAVEX        = 0x130000,     /* MS WAVE with WAVEFORMATEX */
          SF_FORMAT_SD2          = 0x160000,     /* Sound Designer 2 */
          SF_FORMAT_FLAC         = 0x170000,     /* FLAC lossless file format */
          SF_FORMAT_CAF          = 0x180000,     /* Core Audio File format */

          /* Subtypes from here on. */

          SF_FORMAT_PCM_S8       = 0x0001,       /* Signed 8 bit data */
          SF_FORMAT_PCM_16       = 0x0002,       /* Signed 16 bit data */
          SF_FORMAT_PCM_24       = 0x0003,       /* Signed 24 bit data */
          SF_FORMAT_PCM_32       = 0x0004,       /* Signed 32 bit data */

          SF_FORMAT_PCM_U8       = 0x0005,       /* Unsigned 8 bit data (WAV 
and RAW only) */

          SF_FORMAT_FLOAT        = 0x0006,       /* 32 bit float data */
          SF_FORMAT_DOUBLE       = 0x0007,       /* 64 bit float data */

          SF_FORMAT_ULAW         = 0x0010,       /* U-Law encoded. */
          SF_FORMAT_ALAW         = 0x0011,       /* A-Law encoded. */
          SF_FORMAT_IMA_ADPCM    = 0x0012,       /* IMA ADPCM. */
          SF_FORMAT_MS_ADPCM     = 0x0013,       /* Microsoft ADPCM. */

          SF_FORMAT_GSM610       = 0x0020,       /* GSM 6.10 encoding. */
          SF_FORMAT_VOX_ADPCM    = 0x0021,       /* Oki Dialogic ADPCM 
encoding. */

          SF_FORMAT_G721_32      = 0x0030,       /* 32kbs G721 ADPCM encoding. 
*/
          SF_FORMAT_G723_24      = 0x0031,       /* 24kbs G723 ADPCM encoding. 
*/
          SF_FORMAT_G723_40      = 0x0032,       /* 40kbs G723 ADPCM encoding. 
*/

          SF_FORMAT_DWVW_12      = 0x0040,       /* 12 bit Delta Width Variable 
Word encoding. */
          SF_FORMAT_DWVW_16      = 0x0041,       /* 16 bit Delta Width Variable 
Word encoding. */
          SF_FORMAT_DWVW_24      = 0x0042,       /* 24 bit Delta Width Variable 
Word encoding. */
          SF_FORMAT_DWVW_N       = 0x0043,       /* N bit Delta Width Variable 
Word encoding. */

          SF_FORMAT_DPCM_8       = 0x0050,       /* 8 bit differential PCM (XI 
only) */
          SF_FORMAT_DPCM_16      = 0x0051,       /* 16 bit differential PCM (XI 
only) */

          /* Endian-ness options. */

          SF_ENDIAN_FILE         = 0x00000000,   /* Default file endian-ness. */
          SF_ENDIAN_LITTLE       = 0x10000000,   /* Force little endian-ness. */
          SF_ENDIAN_BIG          = 0x20000000,   /* Force big endian-ness. */
          SF_ENDIAN_CPU          = 0x30000000,   /* Force CPU endian-ness. */

          SF_FORMAT_SUBMASK      = 0x0000FFFF,
          SF_FORMAT_TYPEMASK     = 0x0FFF0000,
          SF_FORMAT_ENDMASK      = 0x30000000

not listed here,
but ogg format is also since version 1.0.18 available.

also the export dialog works a bit unclear. imo we don't need this dialog. we 
can open directly a qfiledialog to edit path and filename. filtersettings in 
this dialog allow to choose the file extension. this set the format e.g aiff.
after qfiledialog accept the dialog there will open a small dialog to set 
extensions/format settings dependent from the format which is in use. this 
prevent users to configure to much settings right.

greetings wolke 

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Hydrogen-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hydrogen-devel

Reply via email to