hedgewars/SDLh.pas
changeset 174 0b2c5b22f644
parent 154 5667e6f38704
child 183 57c2ef19f719
equal deleted inserted replaced
173:004493dd60e4 174:0b2c5b22f644
   272       {$ENDIF}
   272       {$ENDIF}
   273       {$IFDEF UNIX}
   273       {$IFDEF UNIX}
   274       SDL_MixerLibName = 'libSDL_mixer.so';
   274       SDL_MixerLibName = 'libSDL_mixer.so';
   275       {$ENDIF}
   275       {$ENDIF}
   276 
   276 
       
   277 const MIX_MAX_VOLUME = 128;
       
   278 
   277 type PMixChunk = ^TMixChunk;
   279 type PMixChunk = ^TMixChunk;
   278      TMixChunk = record
   280      TMixChunk = record
   279                  allocated: Longword;
   281                  allocated: Longword;
   280                  abuf     : PByte;
   282                  abuf     : PByte;
   281                  alen     : Longword;
   283                  alen     : Longword;
   300                  end;
   302                  end;
   301 
   303 
   302 function  Mix_OpenAudio(frequency: LongInt; format: Word; channels: LongInt; chunksize: LongInt): LongInt; cdecl; external SDL_MixerLibName;
   304 function  Mix_OpenAudio(frequency: LongInt; format: Word; channels: LongInt; chunksize: LongInt): LongInt; cdecl; external SDL_MixerLibName;
   303 procedure Mix_CloseAudio; cdecl; external SDL_MixerLibName;
   305 procedure Mix_CloseAudio; cdecl; external SDL_MixerLibName;
   304 
   306 
       
   307 function  Mix_Volume(channel: LongInt; volume: LongInt): LongInt; cdecl; external SDL_MixerLibName;
       
   308 function  Mix_SetDistance(channel: LongInt; distance: Byte): LongInt;  cdecl; external SDL_MixerLibName;
   305 function  Mix_VolumeMusic(volume: LongInt): LongInt; cdecl; external SDL_MixerLibName;
   309 function  Mix_VolumeMusic(volume: LongInt): LongInt; cdecl; external SDL_MixerLibName;
   306 
   310 
   307 function Mix_AllocateChannels(numchans: LongInt): LongInt; cdecl; external SDL_MixerLibName;
   311 function  Mix_AllocateChannels(numchans: LongInt): LongInt; cdecl; external SDL_MixerLibName;
   308 procedure Mix_FreeChunk(chunk: PMixChunk); cdecl; external SDL_MixerLibName;
   312 procedure Mix_FreeChunk(chunk: PMixChunk); cdecl; external SDL_MixerLibName;
   309 procedure Mix_FreeMusic(music: PMixMusic); cdecl; external SDL_MixerLibName;
   313 procedure Mix_FreeMusic(music: PMixMusic); cdecl; external SDL_MixerLibName;
   310 
   314 
   311 function  Mix_LoadWAV_RW(src: PSDL_RWops; freesrc: LongInt): PMixChunk; cdecl; external SDL_MixerLibName;
   315 function  Mix_LoadWAV_RW(src: PSDL_RWops; freesrc: LongInt): PMixChunk; cdecl; external SDL_MixerLibName;
   312 function  Mix_LoadMUS(const filename: PChar): PMixMusic; cdecl; external SDL_MixerLibName;
   316 function  Mix_LoadMUS(const filename: PChar): PMixMusic; cdecl; external SDL_MixerLibName;