Timeline: Improve error message for sf_open create.
This commit is contained in:
parent
b0d850ff76
commit
5378bbbb27
|
@ -112,7 +112,10 @@ Audio_File_SF::create ( const char *filename, nframes_t samplerate, int channels
|
||||||
const Audio_File::format_desc *fd = Audio_File::find_format( Audio_File_SF::supported_formats, format );
|
const Audio_File::format_desc *fd = Audio_File::find_format( Audio_File_SF::supported_formats, format );
|
||||||
|
|
||||||
if ( ! fd )
|
if ( ! fd )
|
||||||
|
{
|
||||||
|
DMESSAGE( "Unsupported capture format: %s", format );
|
||||||
return (Audio_File_SF *)1;
|
return (Audio_File_SF *)1;
|
||||||
|
}
|
||||||
|
|
||||||
si.samplerate = samplerate;
|
si.samplerate = samplerate;
|
||||||
si.channels = channels;
|
si.channels = channels;
|
||||||
|
@ -125,7 +128,7 @@ Audio_File_SF::create ( const char *filename, nframes_t samplerate, int channels
|
||||||
|
|
||||||
if ( ! ( out = sf_open( filepath, SFM_WRITE, &si ) ) )
|
if ( ! ( out = sf_open( filepath, SFM_WRITE, &si ) ) )
|
||||||
{
|
{
|
||||||
printf( "couldn't create soundfile.\n" );
|
WARNING( "couldn't create soundfile \"%s\": libsndfile says: %s", filepath, sf_strerror(NULL) );
|
||||||
free( name );
|
free( name );
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,7 +287,7 @@ Track::record ( Capture *c, nframes_t frame )
|
||||||
free( pat );
|
free( pat );
|
||||||
|
|
||||||
if ( ! c->audio_file )
|
if ( ! c->audio_file )
|
||||||
FATAL( "Could not create file for new capture!" );
|
FATAL( "Could not create file for new capture! (%s)", pat );
|
||||||
|
|
||||||
/* open it again for reading in the GUI thread */
|
/* open it again for reading in the GUI thread */
|
||||||
// Audio_File *af = Audio_File::from_file( c->audio_file->name() );
|
// Audio_File *af = Audio_File::from_file( c->audio_file->name() );
|
||||||
|
|
Loading…
Reference in New Issue