Skip to content
Permalink
Browse files

*** empty log message ***

  • Loading branch information
slouken committed Dec 17, 2001
1 parent f15d9e6 commit 77e70d25938fe44eae495ffa6c9540cadb46b31a
Showing with 11 additions and 22 deletions.
  1. +5 −5 load_voc.c
  2. +5 −4 timidity/instrum.c
  3. +0 −3 timidity/playmidi.c
  4. +1 −10 timidity/readmidi.c
@@ -50,7 +50,7 @@ typedef struct vocstuff {
Uint32 samples; /* number of samples output */
Uint32 size; /* word length of data */
Uint8 channels; /* number of sound channels */
int extended; /* Has an extended block been read? */
int has_extended; /* Has an extended block been read? */
} vs_t;

/* Size field */
@@ -150,7 +150,7 @@ static int voc_get_block(SDL_RWops *src, vs_t *v, SDL_AudioSpec *spec)

/* When DATA block preceeded by an EXTENDED */
/* block, the DATA blocks rate value is invalid */
if (!v->extended)
if (!v->has_extended)
{
if (uc == 0)
{
@@ -178,7 +178,7 @@ static int voc_get_block(SDL_RWops *src, vs_t *v, SDL_AudioSpec *spec)
return 0;
}

v->extended = 0;
v->has_extended = 0;
v->rest = sblen - 2;
v->size = ST_SIZE_BYTE;
return 1;
@@ -265,7 +265,7 @@ static int voc_get_block(SDL_RWops *src, vs_t *v, SDL_AudioSpec *spec)
/* Set this byte so we know to use the rate */
/* value from the extended block and not the */
/* data block. */
v->extended = 1;
v->has_extended = 1;
if (SDL_RWread(src, &new_rate_short, sizeof (new_rate_short), 1) != 1)
return 0;
new_rate_short = SDL_SwapLE16(new_rate_short);
@@ -389,7 +389,7 @@ SDL_AudioSpec *Mix_LoadVOC_RW (SDL_RWops *src, int freesrc,

v.rate = -1;
v.rest = 0;
v.extended = 0;
v.has_extended = 0;
*audio_buf = NULL;
*audio_len = 0;
memset(spec, '\0', sizeof (SDL_AudioSpec));
@@ -188,7 +188,7 @@ static Instrument *load_instrument(char *name, int percussion,
if (!name) return 0;

/* Open patch file */
if (!(fp=open_file(name, 1, OF_NORMAL)))
if ((fp=open_file(name, 1, OF_NORMAL)) == NULL)
{
noluck=1;
#ifdef PATCH_EXT_LIST
@@ -197,9 +197,10 @@ static Instrument *load_instrument(char *name, int percussion,
{
if (strlen(name)+strlen(patch_ext[i])<1024)
{
strcpy(tmp, name);
strcat(tmp, patch_ext[i]);
if ((fp=open_file(tmp, 1, OF_NORMAL)))
char path[1024];
strcpy(path, name);
strcat(path, patch_ext[i]);
if ((fp=open_file(path, 1, OF_NORMAL)) != NULL)
{
noluck=0;
break;
@@ -22,9 +22,6 @@
*/

#include <stdio.h>
#ifndef WIN32
#include <unistd.h>
#endif
#include <stdlib.h>
#include <string.h>

@@ -22,16 +22,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>

#if defined(SOLARIS) | defined(WIN32)
# include <string.h>
#else
#include <strings.h>
#endif

#ifndef WIN32
#include <unistd.h>
#endif
#include <string.h>

#include "config.h"
#include "common.h"

0 comments on commit 77e70d2

Please sign in to comment.