Enabled automatic extraction of .au
This commit is contained in:
parent
f95d7aa6aa
commit
7d6e1b18e6
@ -360,8 +360,10 @@ results with audio data files which are :
|
||||
little-endian byte order with option -swab
|
||||
Files with name extension .wav get examined wether they are in Microsoft WAVE
|
||||
format with above parameters and eventually get extracted by cdrskin itself.
|
||||
All other formats (including SUN's format .au) are to be extracted by commands
|
||||
like those given above under "Usage examples".
|
||||
Files with name extension .au get examined wether they are in SUN's audio
|
||||
format with above parameters. Their big-endianness gets handled properly.
|
||||
Any other formats are to be extracted by commands like those given above under
|
||||
"Usage examples".
|
||||
|
||||
I myself am not into audio. So libburn-hackers@pykix.org might be the
|
||||
best address for suggestions, requests and bug reports.
|
||||
|
@ -926,7 +926,7 @@ int Cdrtrack_get_fifo(struct CdrtracK *track, struct CdrfifO **fifo, int flag)
|
||||
int Cdrtrack_extract_audio(struct CdrtracK *track, int *fd, off_t *xtr_size,
|
||||
int flag)
|
||||
{
|
||||
int l;
|
||||
int l, ok= 0;
|
||||
#ifdef Cdrskin_libburn_has_audioxtR
|
||||
struct libdax_audioxtr *xtr= NULL;
|
||||
char *fmt,*fmt_info;
|
||||
@ -938,9 +938,13 @@ int Cdrtrack_extract_audio(struct CdrtracK *track, int *fd, off_t *xtr_size,
|
||||
if(track->track_type!=BURN_AUDIO && !track->track_type_by_default)
|
||||
return(0);
|
||||
l= strlen(track->source_path);
|
||||
if(l<4)
|
||||
return(0);
|
||||
if(strcmp(track->source_path+l-4,".wav")!=0)
|
||||
if(l>=4)
|
||||
if(strcmp(track->source_path+l-4,".wav")!=0)
|
||||
ok= 1;
|
||||
if(l>=3)
|
||||
if(strcmp(track->source_path+l-3,".au")!=0)
|
||||
ok= 1;
|
||||
if(!ok)
|
||||
return(0);
|
||||
|
||||
if(track->track_type_by_default) {
|
||||
@ -957,7 +961,7 @@ int Cdrtrack_extract_audio(struct CdrtracK *track, int *fd, off_t *xtr_size,
|
||||
return(ret);
|
||||
libdax_audioxtr_get_id(xtr,&fmt,&fmt_info,
|
||||
&num_channels,&sample_rate,&bits_per_sample,&msb_first,0);
|
||||
if(strcmp(fmt,".wav")!=0 ||
|
||||
if((strcmp(fmt,".wav")!=0 && strcmp(fmt,".au")!=0) ||
|
||||
num_channels!=2 || sample_rate!=44100 || bits_per_sample!=16) {
|
||||
fprintf(stderr,"cdrskin: ( %s )\n",fmt_info);
|
||||
fprintf(stderr,"cdrskin: FATAL : Inappropriate audio coding in '%s'.\n",
|
||||
|
@ -1 +1 @@
|
||||
#define Cdrskin_timestamP "2006.10.24.102107"
|
||||
#define Cdrskin_timestamP "2006.10.24.130259"
|
||||
|
@ -146,7 +146,7 @@ help:;
|
||||
fprintf(stderr, "Detected format: %s\n", fmt_info);
|
||||
libdax_audioxtr_get_size(xtr, &data_size, 0);
|
||||
fprintf(stderr, "Data size : %.f bytes\n", (double) data_size);
|
||||
if(strcmp(fmt,".wav")!=0 ||
|
||||
if((strcmp(fmt,".wav")!=0 && strcmp(fmt,".au")!=0) ||
|
||||
num_channels!=2 || sample_rate!=44100 || bits_per_sample!=16) {
|
||||
fprintf(stderr,
|
||||
"%sAudio source parameters do not comply to cdrskin/README specs\n",
|
||||
@ -154,6 +154,9 @@ help:;
|
||||
if(be_strict)
|
||||
exit(6);
|
||||
}
|
||||
if(msb_first==0)
|
||||
fprintf(stderr,
|
||||
"NOTE: Extracted data to be written with cdrskin option -swab\n");
|
||||
|
||||
if(detach_fd) {
|
||||
/* Take over fd from xtr */;
|
||||
|
Loading…
Reference in New Issue
Block a user