Example #1
0
File: music.c Project: Blzut3/Engoo
int MUSIC_PlaySong
   (
   unsigned char *song,
   int loopflag
   )

   {
   int status;

   MUSIC_StopSong();

   status = MIDI_PlaySong( song, loopflag );
   if ( status != MIDI_Ok )
      {
      MUSIC_SetErrorCode( MUSIC_MidiError );
      return( MUSIC_Warning );
      }

   return( MUSIC_Ok );
   }
Example #2
0
int MUSIC_PlaySong
   (
   unsigned char *song,
   int loopflag
   )

   {
   int status;

   switch( MUSIC_SoundDevice )
      {
      case SoundBlaster :
      case Adlib :
      case ProAudioSpectrum :
      case SoundMan16 :
      case GenMidi :
      case SoundCanvas :
      case WaveBlaster :
      case SoundScape :
      case Awe32 :
      case UltraSound :
         MIDI_StopSong();
         status = MIDI_PlaySong( song, loopflag );
         if ( status != MIDI_Ok )
            {
            MUSIC_SetErrorCode( MUSIC_MidiError );
            return( MUSIC_Warning );
            }
         break;

      case SoundSource :
      case PC :
      default :
         MUSIC_SetErrorCode( MUSIC_InvalidCard );
         return( MUSIC_Warning );
         break;
      }

   return( MUSIC_Ok );
   }