Commit 5bc8fff6 authored by Fabian Müller's avatar Fabian Müller
Browse files
parent dfea7efe
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@
 *-----------------------------------------------------------------------*/

/* main handle */
struct __G192
struct G192_STRUCT
{
    FILE *file;
    int16_t ownFileHandle; /* flag whether FILE handle created by instance or externally */
@@ -79,12 +79,12 @@ G192_ERROR G192_Reader_Open_filename(
    const char *filename )
{
    /* create handle */
    *phG192 = (G192_HANDLE) calloc( 1, sizeof( struct __G192 ) );
    *phG192 = (G192_HANDLE) calloc( 1, sizeof( struct G192_STRUCT ) );
    if ( !phG192 )
    {
        return G192_MEMORY_ERROR;
    }
    memset( *phG192, 0, sizeof( struct __G192 ) );
    memset( *phG192, 0, sizeof( struct G192_STRUCT ) );

    /* open file stream */
    ( *phG192 )->file = fopen( filename, "rb" );
@@ -422,7 +422,7 @@ G192_ERROR G192_Writer_Open_filename(
    const char *filename )
{
    /* create handle */
    *phG192 = (G192_HANDLE) calloc( 1, sizeof( struct __G192 ) );
    *phG192 = (G192_HANDLE) calloc( 1, sizeof( struct G192_STRUCT ) );
    if ( !phG192 )
    {
        return G192_MEMORY_ERROR;
+2 −2
Original line number Diff line number Diff line
@@ -67,8 +67,8 @@ typedef enum _G192_ERROR
 *-----------------------------------------------------------------------*/

/* main handle */
struct __G192;
typedef struct __G192 *G192_HANDLE;
struct G192_STRUCT;
typedef struct G192_STRUCT *G192_HANDLE;


/*-----------------------------------------------------------------------*
+2 −2
Original line number Diff line number Diff line
@@ -54,14 +54,14 @@
#define __TWI_SUCCESS ( 0 )
#define __TWI_ERROR   ( -1 )

typedef struct __tinyWaveInHandle
typedef struct tinyWaveInHandle
{
    FILE *theFile;
    fpos_t dataChunkPos;
    uint32_t position;
    uint32_t length;
    uint32_t bps;
} __tinyWaveInHandle, WAVEFILEIN;
} tinyWaveInHandle, WAVEFILEIN;

typedef struct
{
+11 −11
Original line number Diff line number Diff line
@@ -70,15 +70,15 @@
#endif
#endif

typedef struct __tinyWaveOutHeader
typedef struct tinyWaveOutHeader
{
    uint32_t riffType; /* 'RIFF' */
    uint32_t riffSize; /* file size */

    uint32_t waveType; /* 'WAVE' */
} __tinyWaveOutHeader;
} tinyWaveOutHeader;

typedef struct __tinyWaveOutFmtChunk
typedef struct tinyWaveOutFmtChunk
{
    uint32_t formatType;
    uint32_t formatSize;
@@ -91,16 +91,16 @@ typedef struct __tinyWaveOutFmtChunk
    uint16_t bitsPerSample;

    /* wav fmt ext hdr here */
} __tinyWaveOutFmtChunk;
} tinyWaveOutFmtChunk;

typedef struct __tinyWaveOutDataChunk
typedef struct tinyWaveOutDataChunk
{
    uint32_t dataType;
    uint32_t dataSize;

} __tinyWaveOutDataChunk;
} tinyWaveOutDataChunk;

typedef struct __tinyWaveOutHandle
typedef struct tinyWaveOutHandle
{
    FILE *theFile;
    uint32_t dataSize;
@@ -109,7 +109,7 @@ typedef struct __tinyWaveOutHandle
    uint32_t dataChunkOffset;
    uint32_t bps;
    uint32_t clipCount;
} __tinyWaveOutHandle, WAVEFILEOUT;
} tinyWaveOutHandle, WAVEFILEOUT;

/*--- local protos --------------------------------------------------*/
static __inline uint32_t BigEndian32( char, char, char, char );
@@ -132,9 +132,9 @@ static WAVEFILEOUT *CreateBWF(
    /* ,const uint32_t writeWaveExt */ )
{
    WAVEFILEOUT *self;
    __tinyWaveOutHeader whdr;
    __tinyWaveOutFmtChunk wfch;
    __tinyWaveOutDataChunk wdch;
    tinyWaveOutHeader whdr;
    tinyWaveOutFmtChunk wfch;
    tinyWaveOutDataChunk wdch;
    uint32_t blockAlignment = 0;
    uint32_t ByteCnt = 0; /* Byte counter for fwrite */