Skip to content
Permalink
Browse files

Minor cleanups

  • Loading branch information
slouken committed Sep 11, 2001
1 parent d891338 commit 68968734f8f821667fd8d49430e7bb85489a8e6f
Showing with 14 additions and 18 deletions.
  1. +1 −0 acinclude.m4
  2. +8 −10 effect_position.c
  3. +1 −2 effect_stereoreverse.c
  4. +1 −3 load_aiff.c
  5. +3 −3 load_voc.c
@@ -32,6 +32,7 @@ AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run
fi
fi
AC_REQUIRE([AC_CANONICAL_TARGET])
AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
min_sdl_version=ifelse([$1], ,0.11.0,$1)
AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
@@ -26,8 +26,8 @@

#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <unistd.h>
#include <string.h>

#include "SDL.h"
#include "SDL_mixer.h"

@@ -438,8 +438,8 @@ int Mix_SetPanning(int channel, Uint8 left, Uint8 right)

args->left_u8 = left;
args->right_u8 = right;
args->left_f = ((float) left) / 255.0;
args->right_f = ((float) right) / 255.0;
args->left_f = ((float) left) / 255.0f;
args->right_f = ((float) right) / 255.0f;
if (!args->in_use) {
args->in_use = 1;
return(Mix_RegisterEffect(channel, f, _Eff_PositionDone, (void *) args));
@@ -474,7 +474,7 @@ int Mix_SetDistance(int channel, Uint8 distance)
}

args->distance_u8 = distance;
args->distance_f = ((float) distance) / 255.0;
args->distance_f = ((float) distance) / 255.0f;
if (!args->in_use) {
args->in_use = 1;
return(Mix_RegisterEffect(channel, f, _Eff_PositionDone, (void *) args));
@@ -491,8 +491,6 @@ int Mix_SetPosition(int channel, Sint16 angle, Uint8 distance)
int channels;
position_args *args = NULL;
Uint8 left = 255, right = 255;
int flip;
float angle_f;

Mix_QuerySpec(NULL, &format, &channels);
f = get_position_effect_func(format);
@@ -537,11 +535,11 @@ int Mix_SetPosition(int channel, Sint16 angle, Uint8 distance)
distance = 255 - distance; /* flip it to scale Mix_SetDistance() uses. */

args->left_u8 = left;
args->left_f = ((float) left) / 255.0;
args->left_f = ((float) left) / 255.0f;
args->right_u8 = right;
args->right_f = ((float) right) / 255.0;
args->right_f = ((float) right) / 255.0f;
args->distance_u8 = distance;
args->distance_f = ((float) distance) / 255.0;
args->distance_f = ((float) distance) / 255.0f;
if (!args->in_use) {
args->in_use = 1;
return(Mix_RegisterEffect(channel, f, _Eff_PositionDone, (void *) args));
@@ -26,8 +26,7 @@

#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <unistd.h>

#include "SDL.h"
#include "SDL_mixer.h"

@@ -24,9 +24,7 @@
This file by Torbjörn Andersson (torbjorn.andersson@eurotime.se)
*/

#include "SDL_mutex.h"
#include "SDL_endian.h"
#include "SDL_timer.h"
#include <string.h>

#include "SDL_mixer.h"
#include "load_aiff.h"
@@ -88,7 +88,7 @@ typedef struct vocstuff {
#define VOC_DATA_16 9


static inline int voc_check_header(SDL_RWops *src)
static int voc_check_header(SDL_RWops *src)
{
/* VOC magic header */
Uint8 signature[20]; /* "Creative Voice File\032" */
@@ -127,7 +127,7 @@ static int voc_get_block(SDL_RWops *src, vs_t *v, SDL_AudioSpec *spec)
Uint32 new_rate_long;
Uint8 trash[6];
Uint16 period;
int i;
unsigned int i;

v->silent = 0;
while (v->rest == 0)
@@ -167,7 +167,7 @@ static int voc_get_block(SDL_RWops *src, vs_t *v, SDL_AudioSpec *spec)
}

v->rate = uc;
spec->freq = 1000000.0/(256 - v->rate);
spec->freq = (Uint16)(1000000.0/(256 - v->rate));
v->channels = 1;
}

0 comments on commit 6896873

Please sign in to comment.