/* bsound.h */
/* Sound for Bombz */

#ifndef __bsound_h
#define __bsound_h

#include "DeskLib:Core.h"

/* Set up stereotab */
void bsound_initialise(void);

/* Number of channels in use */
extern int SoundChannels;

#define SoundVolume 0x17f

/* Current channel */
extern int sound_channel;

#define BangPitch 0x4000
#define GongPitch 0x5000
#define BeepPitch 0x4800
#define OracPitch 0x3800
#define DigPitch 0x4000

/* Table for generating stereo position from map x */
extern int bsound_stereotab[];

/* From OSLib */
extern os_error *xsound_configure (int channel_count,
      int sample_size,
      int sample_period,
      void const *channel_handler,
      void const *scheduler,
      int *channel_count_out,
      int *sample_size_out,
      int *sample_period_out,
      void **channel_handler_out,
      void **scheduler_out);

extern os_error *xsound_stereo (int channel_no,
      int position,
      int *position_out);

extern os_error *xsound_attach_named_voice (int channel_no,
      char const *voice_name);

extern os_error *xsound_control (int channel_no,
      int amplitude,
      int pitch,
      int duration);

/* Initialise sound to our settings then reset */
void init_sound(void);
void reset_sound(void);

#endif
