Browse Source

Timeline: Improve error message for sf_open create.

tags/non-daw-v1.3.0
Jonathan Moore Liles 3 years ago
parent
commit
5378bbbb27
2 changed files with 5 additions and 2 deletions
  1. +4
    -1
      timeline/src/Engine/Audio_File_SF.C
  2. +1
    -1
      timeline/src/Engine/Track.C

+ 4
- 1
timeline/src/Engine/Audio_File_SF.C 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;
}


+ 1
- 1
timeline/src/Engine/Track.C 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() );


Loading…
Cancel
Save