MyMidiPlayer Class Reference

#include <Midi.h>

Collaboration diagram for MyMidiPlayer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MyMidiPlayer ()
 ~MyMidiPlayer ()
 MyMidiPlayer (const char *flexfile)
void start_music (int num, bool continuous=false, int bank=0)
void start_music (const char *fname, int num, bool continuous=false)
void start_track (int num, bool continuous=false, int bank=0)
void start_track (const char *fname, int num, bool continuous=false)
void start_track (XMIDIEventList *eventlist, bool continuous=false)
void start_sound_effect (int num)
void stop_sound_effects ()
void load_patches (bool force_xmidi=false)
void stop_music ()
bool add_midi_bank (const char *s)
void set_music_conversion (int conv)
int get_music_conversion ()
void set_effects_conversion (int conv)
int get_effects_conversion ()
int get_output_driver_type ()
void set_output_driver_type (int)
bool is_track_playing (int num)
int get_current_track ()
int is_repeating ()
bool is_fm_synth ()

Private Member Functions

 MyMidiPlayer (const MyMidiPlayer &m)
MyMidiPlayeroperator= (const MyMidiPlayer &)
void kmidi_start_track (int num, bool continuous=false)
bool init_device (void)

Private Attributes

std::vector< std::string > midi_bank
int current_track
bool repeating
MidiAbstractmidi_device
bool initialized
int music_conversion
int effects_conversion
int output_driver_type

Detailed Description

Definition at line 85 of file Midi.h.


Constructor & Destructor Documentation

MyMidiPlayer::MyMidiPlayer (  ) 

Definition at line 595 of file Midi.cc.

References add_midi_bank(), init_device(), INTROMUS, INTROMUS_AD, MAINMUS, and MAINMUS_AD.

Here is the call graph for this function:

MyMidiPlayer::~MyMidiPlayer (  ) 

Definition at line 610 of file Midi.cc.

References midi_device.

MyMidiPlayer::MyMidiPlayer ( const char *  flexfile  ) 

MyMidiPlayer::MyMidiPlayer ( const MyMidiPlayer m  )  [private]


Member Function Documentation

void MyMidiPlayer::start_music ( int  num,
bool  continuous = false,
int  bank = 0 
)

Definition at line 305 of file Midi.cc.

References BLACK_GATE, current_track, Game::get_game_type(), init_device(), MidiAbstract::is_playing(), midi_device, and start_track().

Referenced by Audio::start_music(), and Audio::start_music_combat().

Here is the call graph for this function:

void MyMidiPlayer::start_music ( const char *  fname,
int  num,
bool  continuous = false 
)

Definition at line 318 of file Midi.cc.

References init_device(), midi_device, and start_track().

Here is the call graph for this function:

void MyMidiPlayer::start_track ( int  num,
bool  continuous = false,
int  bank = 0 
)

Definition at line 58 of file Midi.cc.

References bgconvmusic, current_track, Game::get_game_type(), get_system_path(), XMIDI::GetEventList(), init_device(), MidiAbstract::is_fm_synth(), midi_bank, midi_device, MIDI_DRIVER_OGG, music_conversion, oggmusic, output_driver_type, repeating, U7object::retrieve(), s, SERPENT_ISLE, size, MidiAbstract::start_track(), stop_music(), to_uppercase(), MidiAbstract::use_gs127(), and XMIDI_CONVERT_MT32_TO_GS127.

Referenced by start_music(), and Audio::start_music().

Here is the call graph for this function:

void MyMidiPlayer::start_track ( const char *  fname,
int  num,
bool  continuous = false 
)

Definition at line 207 of file Midi.cc.

References current_track, Game::get_game_type(), get_system_path(), XMIDI::GetEventList(), init_device(), midi_device, MIDI_DRIVER_OGG, music_conversion, oggmusic, output_driver_type, repeating, s, SERPENT_ISLE, MidiAbstract::start_track(), MidiAbstract::stop_track(), to_uppercase(), U7open(), MidiAbstract::use_gs127(), and XMIDI_CONVERT_MT32_TO_GS127.

Here is the call graph for this function:

void MyMidiPlayer::start_track ( XMIDIEventList eventlist,
bool  continuous = false 
)

Definition at line 292 of file Midi.cc.

References init_device(), midi_device, and MidiAbstract::start_track().

Here is the call graph for this function:

void MyMidiPlayer::start_sound_effect ( int  num  ) 

Definition at line 618 of file Midi.cc.

References bgconv, BLACK_GATE, effects_conversion, Game::get_game_type(), XMIDI::GetEventList(), init_device(), midi_device, U7object::retrieve(), size, and MidiAbstract::start_sfx().

Referenced by Audio::play_sound_effect().

Here is the call graph for this function:

void MyMidiPlayer::stop_sound_effects (  ) 

Definition at line 663 of file Midi.cc.

References midi_device, and MidiAbstract::stop_sfx().

Referenced by Audio::stop_sound_effects().

Here is the call graph for this function:

void MyMidiPlayer::load_patches ( bool  force_xmidi = false  )  [inline]

Definition at line 99 of file Midi.h.

References MidiAbstract::load_patches(), and midi_device.

Referenced by Game::create_game(), BG_Game::end_game(), and init_device().

Here is the call graph for this function:

void MyMidiPlayer::stop_music (  ) 

Definition at line 325 of file Midi.cc.

References current_track, init_device(), midi_device, repeating, and MidiAbstract::stop_track().

Referenced by Background_noise::handle_event(), set_output_driver_type(), start_track(), and Audio::stop_music().

Here is the call graph for this function:

bool MyMidiPlayer::add_midi_bank ( const char *  s  ) 

Definition at line 336 of file Midi.cc.

References midi_bank.

Referenced by MyMidiPlayer().

void MyMidiPlayer::set_music_conversion ( int  conv  ) 

Definition at line 381 of file Midi.cc.

References config, music_conversion, Configuration::set(), XMIDI_CONVERT_MT32_TO_GS, XMIDI_CONVERT_MT32_TO_GS127, and XMIDI_CONVERT_NOCONVERSION.

Referenced by AudioOptions_gump::save_settings(), and ExultMenu::setup().

Here is the call graph for this function:

int MyMidiPlayer::get_music_conversion (  )  [inline]

Definition at line 105 of file Midi.h.

References music_conversion.

Referenced by AudioOptions_gump::load_settings().

void MyMidiPlayer::set_effects_conversion ( int  conv  ) 

Definition at line 401 of file Midi.cc.

References config, effects_conversion, Configuration::set(), and XMIDI_CONVERT_NOCONVERSION.

Referenced by AudioOptions_gump::save_settings(), and ExultMenu::setup().

Here is the call graph for this function:

int MyMidiPlayer::get_effects_conversion (  )  [inline]

Definition at line 107 of file Midi.h.

References effects_conversion.

Referenced by AudioOptions_gump::load_settings().

int MyMidiPlayer::get_output_driver_type (  )  [inline]

Definition at line 109 of file Midi.h.

References output_driver_type.

Referenced by Background_noise::handle_event(), and AudioOptions_gump::load_settings().

void MyMidiPlayer::set_output_driver_type ( int   ) 

Definition at line 415 of file Midi.cc.

References config, initialized, midi_device, MIDI_DRIVER_OGG, output_driver_type, Configuration::set(), and stop_music().

Referenced by AudioOptions_gump::save_settings().

Here is the call graph for this function:

bool MyMidiPlayer::is_track_playing ( int  num  )  [inline]

Definition at line 112 of file Midi.h.

References current_track, MidiAbstract::is_playing(), and midi_device.

Referenced by Audio::is_track_playing().

Here is the call graph for this function:

int MyMidiPlayer::get_current_track (  )  [inline]

Definition at line 115 of file Midi.h.

References current_track, MidiAbstract::is_playing(), and midi_device.

Referenced by Background_noise::handle_event(), and Game_window::write_gwin().

Here is the call graph for this function:

int MyMidiPlayer::is_repeating (  )  [inline]

Definition at line 116 of file Midi.h.

References repeating.

Referenced by Game_window::write_gwin().

bool MyMidiPlayer::is_fm_synth (  )  [inline]

Definition at line 118 of file Midi.h.

References MidiAbstract::is_fm_synth(), and midi_device.

Referenced by SI_Game::end_game(), BG_Game::end_game(), and SI_Game::play_intro().

Here is the call graph for this function:

MyMidiPlayer& MyMidiPlayer::operator= ( const MyMidiPlayer  )  [private]

void MyMidiPlayer::kmidi_start_track ( int  num,
bool  continuous = false 
) [private]

bool MyMidiPlayer::init_device ( void   )  [private]

Definition at line 448 of file Midi.cc.

References Audio::are_effects_enabled(), config, effects_conversion, Audio::get_ptr(), initialized, Audio::is_music_enabled(), load_patches(), midi_device, MIDI_DRIVER_NORMAL, MIDI_DRIVER_OGG, Ucscript::music, music_conversion, output_driver_type, s, Configuration::set(), Ucscript::sfx, TRY_MIDI_DRIVER, Configuration::value(), XMIDI_CONVERT_GS127_TO_GS, XMIDI_CONVERT_MT32_TO_GM, XMIDI_CONVERT_MT32_TO_GS, XMIDI_CONVERT_MT32_TO_GS127, and XMIDI_CONVERT_NOCONVERSION.

Referenced by MyMidiPlayer(), start_music(), start_sound_effect(), start_track(), and stop_music().

Here is the call graph for this function:


Member Data Documentation

std::vector<std::string> MyMidiPlayer::midi_bank [private]

Definition at line 126 of file Midi.h.

Referenced by add_midi_bank(), and start_track().

int MyMidiPlayer::current_track [private]

Definition at line 127 of file Midi.h.

Referenced by get_current_track(), is_track_playing(), start_music(), start_track(), and stop_music().

bool MyMidiPlayer::repeating [private]

Definition at line 128 of file Midi.h.

Referenced by is_repeating(), start_track(), and stop_music().

MidiAbstract* MyMidiPlayer::midi_device [private]

Definition at line 129 of file Midi.h.

Referenced by get_current_track(), init_device(), is_fm_synth(), is_track_playing(), load_patches(), set_output_driver_type(), start_music(), start_sound_effect(), start_track(), stop_music(), stop_sound_effects(), and ~MyMidiPlayer().

bool MyMidiPlayer::initialized [private]

Definition at line 130 of file Midi.h.

Referenced by init_device(), and set_output_driver_type().

int MyMidiPlayer::music_conversion [private]

Definition at line 134 of file Midi.h.

Referenced by get_music_conversion(), init_device(), set_music_conversion(), and start_track().

int MyMidiPlayer::effects_conversion [private]

Definition at line 135 of file Midi.h.

Referenced by get_effects_conversion(), init_device(), set_effects_conversion(), and start_sound_effect().

int MyMidiPlayer::output_driver_type [private]

Definition at line 136 of file Midi.h.

Referenced by get_output_driver_type(), init_device(), set_output_driver_type(), and start_track().


The documentation for this class was generated from the following files:
Generated on Mon Jul 9 14:58:54 2007 for ExultEngine by  doxygen 1.5.1