Skip to content

Commit

Permalink
Use the default audio format for this endianness
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Lantinga committed Oct 5, 2000
1 parent 599b4ef commit 96a3a86
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion SDL_mixer.h
Expand Up @@ -28,6 +28,7 @@
#include "SDL_types.h"
#include "SDL_rwops.h"
#include "SDL_audio.h"
#include "SDL_byteorder.h"
#include "begin_code.h"

/* Set up for C function definitions, even when using C++ */
Expand All @@ -42,7 +43,11 @@ extern "C" {

/* Good default values for a PC soundcard */
#define MIX_DEFAULT_FREQUENCY 22050
#define MIX_DEFAULT_FORMAT AUDIO_S16
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
#define MIX_DEFAULT_FORMAT AUDIO_S16LSB
#else
#define MIX_DEFAULT_FORMAT AUDIO_S16MSB
#endif
#define MIX_DEFAULT_CHANNELS 2
#define MIX_MAX_VOLUME 128 /* Volume of a chunk */

Expand Down
4 changes: 2 additions & 2 deletions playwave.c
Expand Up @@ -64,8 +64,8 @@ main(int argc, char *argv[])
int i;

/* Initialize variables */
audio_rate = 22050;
audio_format = AUDIO_S16;
audio_rate = MIX_DEFAULT_FREQUENCY;
audio_format = MIX_DEFAULT_FORMAT;
audio_channels = 2;

/* Check command line usage */
Expand Down

0 comments on commit 96a3a86

Please sign in to comment.