Subversion Repositories Games.Carmageddon

Rev

Rev 18 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. #ifndef _DOSAUDIO_H_
  2. #define _DOSAUDIO_H_
  3.  
  4. #include "brender/brender.h"
  5. #include "s3_defs.h"
  6.  
  7. extern int gS3_enabled;
  8. extern int gS3_last_error;
  9. extern tS3_channel gS3_channel_template;
  10. extern tS3_sound_source* gS3_sound_sources;
  11. extern int gS3_service_time_delta;
  12. extern int gS3_inside_cockpit;
  13.  
  14. int S3Init(char* path, int low_memory_mode);
  15.  
  16. void S3Enable(void);
  17. void S3Disable(void);
  18.  
  19. int S3OpenOutputDevices(void);
  20. int S3OpenSampleDevice(void);
  21. int S3OpenCDADevice(void);
  22.  
  23. int S3OpenSampleDevice(void);
  24. void S3CloseDevices(void);
  25. tS3_outlet* S3CreateOutlet(int unk1, int pChannel_count);
  26. int S3CreateOutletChannels(tS3_outlet* outlet, int pChannel_count);
  27. void S3ReleaseOutlet(tS3_outlet* outlet);
  28. int S3UnbindChannels(tS3_outlet* outlet);
  29. void S3ReleaseUnboundChannels(void);
  30. tS3_channel* S3AllocateChannel(tS3_outlet* outlet, int priority);
  31. int S3StopChannel(tS3_channel* chan);
  32.  
  33. void S3ReleaseOutlet(tS3_outlet* outlet);
  34. int S3StopOutletSound(tS3_outlet* pOutlet);
  35. void S3StopAllOutletSounds(void);
  36.  
  37. int S3ReleaseSound(tS3_sound_id id);
  38.  
  39. char* S3LoadSoundBankFile(char* pThe_path);
  40. int S3LoadSoundbank(const char* pSoundbank_filename, int pLow_memory_mode);
  41.  
  42. void S3SoundBankReaderNextLine(tS3_soundbank_read_ctx* ctx);
  43. void S3SoundBankReaderSkipWhitespace(tS3_soundbank_read_ctx* ctx);
  44. void S3SoundBankReaderSkipToNewline(tS3_soundbank_read_ctx* ctx);
  45. void S3SoundBankReaderAdvance(tS3_soundbank_read_ctx* buffer, int bytes_read);
  46. int S3SoundBankReaderReadFilename(char** filename, tS3_soundbank_read_ctx* ctx, const char* dir_name);
  47. int S3SoundBankReadEntry(tS3_soundbank_read_ctx* ctx, char* dir_name, int low_memory_mode);
  48.  
  49. tS3_descriptor* S3CreateDescriptor(void);
  50. tS3_descriptor* S3GetDescriptorByID(tS3_sound_id id);
  51.  
  52. char* S3GetCurrentDir(void);
  53.  
  54. void S3CalculateRandomizedFields(tS3_channel* chan, tS3_descriptor* desc);
  55. int S3IRandomBetween(int pMin, int pMax, int pDefault);
  56. int S3IRandomBetweenLog(int pMin, int pMax, int pDefault);
  57. double S3FRandomBetween(double pMin, double pMax);
  58.  
  59. int S3GenerateTag(tS3_outlet* outlet);
  60. int S3ReleaseSound(tS3_sound_id id);
  61. int S3SetOutletVolume(tS3_outlet* pOutlet, tS3_volume pVolume);
  62. tS3_channel* S3GetChannelForTag(tS3_sound_tag tag);
  63. int S3ChangeVolume(tS3_sound_tag pTag, tS3_volume pVolume);
  64.  
  65. void S3ServiceOutlets(void);
  66. int S3ServiceChannel(tS3_channel* chan);
  67. void S3Service(int inside_cockpit, int unk1);
  68.  
  69. int S3SoundStillPlaying(tS3_sound_tag pSound);
  70.  
  71. tS3_sound_source* S3CreateSoundSourceBR(br_vector3* pPosition, br_vector3* pVelocity, tS3_outlet* pBound_outlet);
  72. tS3_sound_source* S3CreateSoundSource(void* pPosition, void* pVelocity, tS3_outlet* pBound_outlet);
  73.  
  74. #endif
  75.