Timeline: Improve error message for sf_open create.

This commit is contained in:
Jonathan Moore Liles 2020-10-07 18:10:34 -07:00
parent b0d850ff76
commit 5378bbbb27
2 changed files with 5 additions and 2 deletions

View File

@ -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 );
if ( ! fd )
{
DMESSAGE( "Unsupported capture format: %s", format );
return (Audio_File_SF *)1;
}
si.samplerate = samplerate;
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 ) ) )
{
printf( "couldn't create soundfile.\n" );
WARNING( "couldn't create soundfile \"%s\": libsndfile says: %s", filepath, sf_strerror(NULL) );
free( name );
return NULL;
}

View File

@ -287,7 +287,7 @@ Track::record ( Capture *c, nframes_t frame )
free( pat );
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 */
// Audio_File *af = Audio_File::from_file( c->audio_file->name() );