Changeset 135bc14


Ignore:
Timestamp:
Mar 31, 2019, 11:12:25 PM (16 months ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink
Children:
08246ee
Parents:
8fe522d (diff), 07c76d0 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'feature/sink_flac' into feature/autosink

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/sink_flac.c

    r8fe522d r135bc14  
    3434#include <FLAC/metadata.h>
    3535#include <FLAC/stream_encoder.h>
    36 
    37 #include <string.h> // strerror
    38 #include <errno.h> // errno
    3936
    4037#define MAX_WRITE_SIZE 4096
     
    133130  FLAC__bool ok = true;
    134131  FLAC__StreamEncoderInitStatus init_status;
     132  FLAC__StreamMetadata_VorbisComment_Entry entry;
    135133  const unsigned comp_level = 5;
    136134  const unsigned bps = 16;
     
    146144  s->fid = fopen((const char *)s->path, "wb");
    147145  if (!s->fid) {
    148     AUBIO_ERR("sink_flac: failed opening %s, %s\n", s->path, strerror(errno));
     146    AUBIO_STRERR("sink_flac: Failed opening %s (%s)\n", s->path, errorstr);
    149147    return AUBIO_FAIL;
    150148  }
     
    186184  }
    187185
    188   FLAC__StreamMetadata_VorbisComment_Entry entry;
    189186  ok = FLAC__metadata_object_vorbiscomment_entry_from_name_value_pair(&entry,
    190187      "encoder", "aubio");
     
    348345
    349346  if (s->fid && fclose(s->fid)) {
    350     AUBIO_ERR("sink_flac: Error closing file %s (%s)\n",
    351         s->path, strerror(errno));
     347    AUBIO_STRERR("sink_flac: Error closing file %s (%s)\n", s->path, errorstr);
    352348    ret &= AUBIO_FAIL;
    353349  }
Note: See TracChangeset for help on using the changeset viewer.