Changes in / [135bc14:8fe522d]


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/sink_flac.c

    r135bc14 r8fe522d  
    3434#include <FLAC/metadata.h>
    3535#include <FLAC/stream_encoder.h>
     36
     37#include <string.h> // strerror
     38#include <errno.h> // errno
    3639
    3740#define MAX_WRITE_SIZE 4096
     
    130133  FLAC__bool ok = true;
    131134  FLAC__StreamEncoderInitStatus init_status;
    132   FLAC__StreamMetadata_VorbisComment_Entry entry;
    133135  const unsigned comp_level = 5;
    134136  const unsigned bps = 16;
     
    144146  s->fid = fopen((const char *)s->path, "wb");
    145147  if (!s->fid) {
    146     AUBIO_STRERR("sink_flac: Failed opening %s (%s)\n", s->path, errorstr);
     148    AUBIO_ERR("sink_flac: failed opening %s, %s\n", s->path, strerror(errno));
    147149    return AUBIO_FAIL;
    148150  }
     
    184186  }
    185187
     188  FLAC__StreamMetadata_VorbisComment_Entry entry;
    186189  ok = FLAC__metadata_object_vorbiscomment_entry_from_name_value_pair(&entry,
    187190      "encoder", "aubio");
     
    345348
    346349  if (s->fid && fclose(s->fid)) {
    347     AUBIO_STRERR("sink_flac: Error closing file %s (%s)\n", s->path, errorstr);
     350    AUBIO_ERR("sink_flac: Error closing file %s (%s)\n",
     351        s->path, strerror(errno));
    348352    ret &= AUBIO_FAIL;
    349353  }
Note: See TracChangeset for help on using the changeset viewer.