Exemplo n.º 1
0
void StreamRender::Pause(){
     Timer->stop();
     BASS_ChannelPause(stream);
     Vumeter->setLeftValue(0);
     Vumeter->setRightValue(0);

 }
HRESULT CBSoundBuffer::Pause()
{
	if (m_Stream)
	{
		BASS_ChannelPause(m_Stream);
	}
	return S_OK;
}
Exemplo n.º 3
0
static void bass_pause(void *d, int flag)
{
	HSTREAM h = *((HSTREAM *)d);
	if (flag)
		BASS_ChannelPause(h);
	else
		BASS_ChannelPlay(h, false);
}
Exemplo n.º 4
0
void Player::Pause()
{
    if (stream == NULL)
        return;
    paused = true;
    stopped = false;
    BASS_ChannelPause(stream);
}
Exemplo n.º 5
0
// --[  Method  ]---------------------------------------------------------------
//
//  - Class     : CSoundStream
//  - prototype : bool Pause()
//
//  - Purpose   : Pauses the playing sound stream.
//
// -----------------------------------------------------------------------------
bool CSoundStream::Pause()
{
    if(!IsValid())
    {
        return false;
    }
    return BASS_ChannelPause(m_handle) == TRUE;
}
Exemplo n.º 6
0
void AudioClip::pause()
{
	oshot = true;
	if (playing)
	{
		BASS_ChannelPause(hm);
		playing = false;
	}
}
Exemplo n.º 7
0
void BassSoundEngine::PauseMusic(CHANNEL Ichannel, bool Pause)
{
	if(!Check(Ichannel))
		return;
	if(Pause)
		BASS_ChannelPause(channel[Ichannel]);
	else
		BASS_ChannelPlay(channel[Ichannel], FALSE);
	//channel[Ichannel]->setPaused(Pause);
}
Exemplo n.º 8
0
void CClientSound::SetPaused ( bool bPaused )
{
    if ( m_pSound )
    {
        if ( bPaused )
            BASS_ChannelPause ( m_pSound );
        else
            BASS_ChannelPlay ( m_pSound, false );
    }
}
Exemplo n.º 9
0
void Stream::Pause(HSTREAM cual)
{
    if(IsPlay(cual))
    {
        BASS_ChannelPause(cual);
        Vumeter->setLeftValue(0);
        Vumeter->setRightValue(0);
        Timer->stop();
    }
}
Exemplo n.º 10
0
//
//
// Lake of sets
//
//
void CBassAudio::SetPaused ( bool bPaused )
{
    m_bPaused = bPaused;
    if ( m_pSound )
    {
        if ( bPaused )
            BASS_ChannelPause ( m_pSound );
        else
            BASS_ChannelPlay ( m_pSound, false );
    }
}
Exemplo n.º 11
0
void Player::setPaused(bool npaused) {
	if(npaused == paused())
		return;

	if(npaused) {
		if(!BASS_ChannelPause(_output))
			Log::error("Bass Error: pausing channel failed: %s", GetBassStrError());
	} else {
		if(!BASS_ChannelPlay(_output, FALSE))
			Log::error("Bass Error: resuming channel playback failed: %s", GetBassStrError());
	}
}
Exemplo n.º 12
0
void BassSoundEngine::PauseAllMusic(bool Pause)
{
	if(Pause){
		for(int i = 0; i < nowChannel; i++)
			if(channel[i]!=NULL)
				BASS_ChannelPause(channel[i]);
	}else{
		for(int i = 0; i < nowChannel; i++)
			if(channel[i]!=NULL)
				BASS_ChannelPlay(channel[i], FALSE);
	}
}
Exemplo n.º 13
0
void shell() {
    printf("Type h for help\n");
    printf("mp3 > ");

    while (key = getchar()) {
        switch (key) {
            case 'e':
                exit_player("Closed", "Program Exiting");
                break;
            case 'i':
                getInfo(0);
                break;
            case 's':
                stop();
                break;
            case 'p':
                if (status == 1) {
                    BASS_ChannelPause(stream);
                    status = 0;
                } else if (status == 0) {
                    BASS_ChannelPlay(stream, 0);
                    status = 1;
                } else if (status == 2) {
                    play(getFile());
                }
                break;
            case 'n':
                if (playcount < toatalcount)
                    playcount++;
                else
                    playcount = 1;
                play_list();
                break;  
            case 'b':
                if (playcount <= 1)
                    playcount = toatalcount;
                else
                    playcount--;

                play_list();
                break;
            case 'h':
                help();
                break;
            case 'a':
                printf("M2O2 player v0.2\n");
                break;
            default:
                printf("mp3 > ");
        }
    }
}
Exemplo n.º 14
0
void Player::setPaused(bool npaused) {
	if(npaused == paused())
		return;


	if(npaused) {
		if(!BASS_ChannelPause(_output))
			std::cerr << "Bass Error: pausing channel failed1: " << BASS_ErrorGetCode() << "\n";
	} else {
		if(!BASS_ChannelPlay(_output, FALSE))
			std::cerr << "Bass Error: resuming channel playback failed: " << BASS_ErrorGetCode() << "\n";
	}
}
Exemplo n.º 15
0
void KNMusicBackendBassThread::save()
{
    //Pause the thread first.
    BASS_ChannelPause(m_channel);
    //Stop the updater.
    m_positionUpdater->stop();
    //Save the position of the current thread.
    m_savedPosition=position();
    //Reset the current playing thread, but saved all the other parameter.
    //Clear up the channel sync handle.
    removeChannelSyncs();
    //Check if the channel is not null.
    freeChannel();
}
Exemplo n.º 16
0
void KNMusicBackendBassThread::pause()
{
    //Check:
    // 1. The state is already paused.
    // 2. The channel is null.
    if(m_state==Paused || (!m_channel))
    {
        return;
    }
    //Pause the thread.
    BASS_ChannelPause(m_channel);
    //Stop the updater.
    m_positionUpdater->stop();
    //Reset the state.
    setPlayingState(Paused);
}
Exemplo n.º 17
0
void KNMusicBackendBassThread::pause()
{
    //Check if the thread data if empty.
    if(m_filePath.isEmpty())
    {
        return;
    }
    //Check the state.
    if(m_playingState!=PausedState)
    {
        //Pause that thread.
        BASS_ChannelPause(m_channel);
        //Stop the updater.
        m_positionUpdater->stop();
        //Reset the state.
        setState(PausedState);
    }
}
Exemplo n.º 18
0
void PlaybackWidget::changeState(PlaybackWidget::Playstate s)
{
    //No need to do anything if there isn't a song playing.
    if(curchan == NULL)
        return;
    if(s == PLAYING)
    {
        ui.playBtn->setIcon(pause);
        BASS_ChannelPlay(curchan,false);
        updateTimer->start();
    }
    else if(s == PAUSED)
    {
        ui.playBtn->setIcon(play);
        BASS_ChannelPause(curchan);
    }
    else if(s == STOPPED)
        stopSong();
    state = s;
}
Exemplo n.º 19
0
void CBassAudio::Destroy ( void )
{
    RemoveCallbackId( m_uiCallbackId );
    m_uiCallbackId = 0;
    if ( m_pSound )
    {
        // Remove all callbacks
        BASS_FX_BPM_BeatFree( m_pSound );
        BASS_FX_BPM_Free( m_pSound );
        BASS_ChannelRemoveSync( m_pSound, m_hSyncDownload );
        BASS_ChannelRemoveSync( m_pSound, m_hSyncEnd );
        BASS_ChannelRemoveSync( m_pSound, m_hSyncFree );
        BASS_ChannelRemoveSync( m_pSound, m_hSyncMeta );

        // Best way to minimize a freeze during BASS_ChannelStop:
        //   * BASS_ChannelPause
        //   * wait a little bit
        //   * BASS_ChannelStop
        BASS_ChannelPause ( m_pSound ); 
        g_pClientGame->GetManager()->GetSoundManager()->QueueAudioStop( this );
    }
    else
        delete this;
}
Exemplo n.º 20
0
bool BassPlayer::pauseProcessing() {
    return BASS_ChannelPause(chan);
}
Exemplo n.º 21
0
BOOL CBassMusicEngine::Pause( HSTREAM hStream )
{
	//if ( m_pMusicState != NULL ) m_pMusicState->OnPause();

	return BASS_ChannelPause(hStream);
}
Exemplo n.º 22
0
void CAudio::Pause()
{
	// Do we have a valid channel?
	if(m_dwChannel != 0)
		BASS_ChannelPause(m_dwChannel);
}
Exemplo n.º 23
0
	// BASS hooks
	void  pause()           { BASS_ChannelPause(stream); }
Exemplo n.º 24
0
void my_keyboard( unsigned char key, int x, int y ) 
{

  GLfloat used_radius;
  GLfloat used_density;
  int used_quantity;
  GLfloat used_cube_size;
  int used_after_counter;
  int num = rand() % (NUM_SOUNDS - 2);
  
   
  int cur_shape = rand() % (NUM_SHAPES+1);			//right now 2 0-regular 1-burst
  
  if(cur_shape){
  		used_radius = reg_radius;
  		used_density = reg_density;
  		used_quantity = reg_quantity;
  		used_after_counter = reg_after_counter;
  
  }
  else{
  		used_radius = bur_radius;
  		used_density = bur_density;
  		used_quantity = bur_quantity;
  		used_after_counter = bur_after_counter;
  		BASS_ChannelSetAttribute(sounds[num], BASS_ATTRIB_VOL, 90);
  	
  
  }

  GLfloat new_radius = (float)((rand()%41 -20)/100.)*used_radius +used_radius;
  GLfloat new_density = (float)((rand()%41 -20)/100.)*used_density +used_density;
  int new_quantity = (int)((float)(rand()%41 -20)/100.)*used_quantity +used_quantity;
  GLfloat new_after_counter= (float)((rand()%41 -20)/100.)*used_after_counter +used_after_counter;
  //GLfloat cur_cube_size = .007;

    
  

  switch( key ) {

  case 'q': 
  case 'Q': {
    exit(0) ;
    break ; 
  }

  case '+':
  case '=': {
    if (cur_variable == RADIUS) {
      cur_radius += 2;
    }
    if (cur_variable == DENSITY) {
      cur_density += 1;
    }
    if (cur_variable == QUANTITY) {
      cur_quantity += 5;
    }
    if (cur_variable == CUBE_SIZE) {
      cur_cube_size += .001;
    }
    if (cur_variable == AFTER_COUNTER) {
      cur_after_counter += 10;
    }
    print_cur();
  } break;

  case 'j': {
    light_screen = 1;
  } break;

  case '-':
  case '_': {
    if (cur_variable == RADIUS) {
      cur_radius -= 2;
    }
    if (cur_variable == DENSITY) {
      cur_density -= 1;
    }
    if (cur_variable == QUANTITY) {
      cur_quantity -= 5;
    }
    if (cur_variable == CUBE_SIZE) {
      cur_cube_size -= .001;
    }
    if (cur_variable == AFTER_COUNTER) {
      cur_after_counter -= 10;
    }
    print_cur();
  } break;


  case 'z': {
    music_playing = (music_playing + 1) % 2;
    if (music_playing) {
      BASS_ChannelPlay(sounds[8], FALSE);
    }
    else {
      BASS_ChannelPause(sounds[8]);
    }
  } break;



  case 'a':
  case 'A': {
    cur_variable = RADIUS;
    print_cur();
  } break;
  case 's':
  case 'S': {
    cur_variable = DENSITY;
    print_cur();
  } break;
  case 'd':
  case 'D': {
    cur_variable = QUANTITY;
    print_cur();
  } break;
  case 'f':
  case 'F': {
    cur_variable = CUBE_SIZE;
    print_cur();
  } break;
  case 'g':
  case 'G': {
    cur_variable = AFTER_COUNTER;
    print_cur();
  } break;

  case '1': {

  	make_explosion(&explosions[num_fireworks = (num_fireworks + 1 )% MAX_FIREWORKS], new_radius, new_density, new_quantity, cur_cube_size, new_after_counter, cur_shape, test_sound, (&nozzles[0])->x, (&nozzles[0])->y + 1.2);
    //make_explosion(&explosions[0], 60, 1, 5000, .02, 48, 1, test_sound, (&nozzles[0])->x, (&nozzles[0])->y + 1);
    BASS_ChannelPlay(sounds[cur_shape], TRUE);

    break;
  }
  case '2': {
  	 make_explosion(&explosions[num_fireworks = (num_fireworks + 1 )% MAX_FIREWORKS], new_radius, new_density, new_quantity, cur_cube_size, new_after_counter, cur_shape, test_sound, (&nozzles[1])->x, (&nozzles[1])->y + 1.2);
    //make_explosion(&explosions[1], 500, 1, 100, .01, 1100, 1, test_sound, (&nozzles[1])->x, (&nozzles[1])->y + 1);
        BASS_ChannelPlay(sounds[cur_shape], TRUE);

    break;
  }
  case '3': {
  	 make_explosion(&explosions[num_fireworks = (num_fireworks + 1 )% MAX_FIREWORKS], new_radius, new_density, new_quantity, cur_cube_size, new_after_counter, cur_shape, test_sound, (&nozzles[2])->x, (&nozzles[2])->y + 1.2);
    //make_explosion(&explosions[2], 6MAX_FIREWORKS, 1, 100, .05, 800, 1, test_sound, (&nozzles[2])->x, (&nozzles[2])->y + 1);
        BASS_ChannelPlay(sounds[cur_shape], TRUE);

    break;
  }
  case '4': {
     if(cur_shape){
     	if(cur_shape ==1){
     		new_radius *=1.5;
     		new_quantity *=1.2;
     	}
     
     }
  	 make_explosion(&explosions[num_fireworks = (num_fireworks + 1 )% MAX_FIREWORKS], new_radius, new_density, new_quantity, cur_cube_size, new_after_counter, cur_shape, test_sound, (&nozzles[3])->x, (&nozzles[3])->y + 1.2);
    //make_explosion(&explosions[3], 1000, 1, 100, .05, 900, 1, test_sound, (&nozzles[3])->x, (&nozzles[3])->y + 1);
        BASS_ChannelPlay(sounds[cur_shape], TRUE);

    break;
  }
  case '5': {
  	 make_explosion(&explosions[num_fireworks = (num_fireworks + 1 )% MAX_FIREWORKS], new_radius, new_density, new_quantity, cur_cube_size, new_after_counter, cur_shape, test_sound, (&nozzles[4])->x, (&nozzles[4])->y + 1.2);
    //make_explosion(&explosions[4], 1MAX_FIREWORKS0, 1, 100, .1, 1000, 1, test_sound, (&nozzles[4])->x, (&nozzles[4])->y + 1);
        BASS_ChannelPlay(sounds[cur_shape], TRUE);

    break;
  }
  case '6': {
  	 make_explosion(&explosions[num_fireworks = (num_fireworks + 1 )% MAX_FIREWORKS], new_radius, new_density, new_quantity, cur_cube_size, new_after_counter, cur_shape, test_sound, (&nozzles[5])->x, (&nozzles[5])->y + 1.2);
    //make_explosion(&explosions[5], 600, 1, 100, .09, 1100, 1, test_sound, (&nozzles[5])->x, (&nozzles[5])->y + 1);
        BASS_ChannelPlay(sounds[cur_shape], TRUE);

    break;
  }
  case '7': {
  	 make_explosion(&explosions[num_fireworks = (num_fireworks + 1 )% MAX_FIREWORKS], new_radius, new_density, new_quantity, cur_cube_size, new_after_counter, cur_shape, test_sound, (&nozzles[6])->x, (&nozzles[6])->y + 1.2);
    //make_explosion(&explosions[6], 2MAX_FIREWORKS0, 1, 100, .3, 1200, 1, test_sound, (&nozzles[6])->x, (&nozzles[6])->y + 1);
        BASS_ChannelPlay(sounds[cur_shape], TRUE);

    break;
  }
  case '0': {
  	
    make_explosion(&explosions[num_fireworks = (num_fireworks + 1 )% MAX_FIREWORKS], new_radius, new_density, new_quantity, cur_cube_size, new_after_counter, cur_shape, test_sound, (&nozzles[3])->x, (&nozzles[3])->y + 1);
  } break;

  default: break;
  }


  glutPostRedisplay();
}
Exemplo n.º 25
0
Arquivo: 3dtest.c Projeto: adius/FeetJ
void StopClicked(GtkButton *obj, gpointer data)
{
	BASS_ChannelPause(chans[chan].channel);
}
Exemplo n.º 26
0
/*************************************************************************
* Main entrypoint for debug build
*************************************************************************/
int WINAPI WinMain(HINSTANCE instance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
    MSG msg;

	g_hInstance = GetModuleHandle(0);
	OutputDebugString("Starting...\n");

    if (!WindowOpen()) {
		OutputDebugString("Failed to open window\n");
		WindowClose();
		return 0;
	}

	if (FAILED(InitDevice())) {
		CleanupDevice();
		return 0;
	}

	IntroInit();
	InitSound();
   
    while (!g_done) {
		g_currentFrame++;
		g_lastTime = g_currentTime;		
		g_currentPos = BASS_ChannelGetPosition(g_stream, BASS_POS_BYTE);
		g_currentTime = BASS_ChannelBytes2Seconds(g_stream, g_currentPos);
		
		if (g_pause) {
			Sleep(100);
		}

	    while (PeekMessage(&msg,0,0,0,PM_REMOVE)) {
            if (msg.message == WM_QUIT) {
				g_done = true;
			}

		    TranslateMessage(&msg);
            DispatchMessage(&msg);

			if (WM_KEYDOWN == msg.message && VK_SPACE == LOWORD(msg.wParam)) {
				if (!g_pause) {
					BASS_ChannelPause(g_stream);
					g_pause = true;
				} else {
					BASS_ChannelPlay(g_stream, false);
					g_pause = false;
				}
			}
			
			if (WM_KEYDOWN == msg.message && VK_LEFT == LOWORD(msg.wParam)) {
				if (g_pause) {
					BASS_ChannelSetPosition(g_stream, g_currentPos-44100, BASS_POS_BYTE);
				} else {
					BASS_ChannelSetPosition(g_stream, g_currentPos-44100*4, BASS_POS_BYTE);
				}
			}

			if (WM_KEYDOWN == msg.message && VK_RIGHT == LOWORD(msg.wParam)) {
				if (g_pause) {
					BASS_ChannelSetPosition(g_stream, g_currentPos+44100, BASS_POS_BYTE);
				} else {
					BASS_ChannelSetPosition(g_stream, g_currentPos+44100*4, BASS_POS_BYTE);
				}
			}

			if (WM_KEYDOWN == msg.message && VK_DOWN == LOWORD(msg.wParam)) {
				BASS_ChannelSetPosition(g_stream, g_currentPos-44100*20, BASS_POS_BYTE);
			}

			if (WM_KEYDOWN == msg.message && VK_UP == LOWORD(msg.wParam)) {
				BASS_ChannelSetPosition(g_stream, g_currentPos+44100*20, BASS_POS_BYTE);
			}

			if (WM_KEYDOWN == msg.message && VK_F1 == LOWORD(msg.wParam)) {
				g_repeatStart = g_currentPos;
				g_repeatEnd = LONG_MAX;
			}

			if (WM_KEYDOWN == msg.message && VK_F2 == LOWORD(msg.wParam)) {
				g_repeatEnd = g_currentPos;
			}

			if (WM_KEYDOWN == msg.message && VK_RETURN == LOWORD(msg.wParam)) {
				g_repeatStart = 0;
				g_repeatEnd = LONG_MAX;
			}
        }

		IntroLoop((long)(g_currentTime*44100.0));
		UpdateTitle();

		if (g_currentPos > g_repeatEnd) {
			BASS_ChannelSetPosition(g_stream, g_repeatStart, BASS_POS_BYTE);
		}
		BASS_Update(0);
    }

	BASS_StreamFree(g_stream);
	BASS_Free();
	
	WindowClose();

    return 0;
}
Exemplo n.º 27
0
void pause_playback(HMUSIC music)
{
	if(BASS_ChannelIsActive(music)==BASS_ACTIVE_PAUSED)
		BASS_ChannelPlay(music, FALSE);
	else BASS_ChannelPause(music);
}
Exemplo n.º 28
0
void BASS_AudioInterface::pause()
{
	BASS_ChannelPause(mStream);
	TheoraTimer::pause();
}
Exemplo n.º 29
0
void my_keyboard( unsigned char key, int x, int y ) 
{ 
  switch( key ) {


  case 'q': 
  case 'Q': {
    exit(0) ;
    break ; 
  }
  
  
  case 'w':
  case 'W': {
  		//sparkler out of 1
  		make_fuse(&fuses[cur_fuse = (cur_fuse + 1) % MAX_FIREWORKS], 30, colors[RED], 0, .04, 0, .01, (&nozzles[0])->x, -1);
  }break;
  
  case 'e':
  case 'E': {
  		//sparkler out of 2
  		make_fuse(&fuses[cur_fuse = (cur_fuse + 1) % MAX_FIREWORKS], 30, colors[RED], 0, .04, 0, .01, (&nozzles[1])->x, -1);
  }break;
  
  case 'r':
  case 'R': {
  		//sparkler out of 3
  		make_fuse(&fuses[cur_fuse = (cur_fuse + 1) % MAX_FIREWORKS], 30, colors[RED], 0, .04, 0, .01, (&nozzles[2])->x, -1);
  }break;
  
  case 't':
  case 'T': {
  		make_fuse(&fuses[cur_fuse = (cur_fuse + 1) % MAX_FIREWORKS], 30, colors[RED], 0, .04, 0, .01, (&nozzles[3])->x, -1);
  		//sparkler out of 4
  
  }break;
  
  case 'y':
  case 'Y': {
  		make_fuse(&fuses[cur_fuse = (cur_fuse + 1) % MAX_FIREWORKS], 30, colors[RED], 0, .04, 0, .01, (&nozzles[4])->x, -1);
  		//sparkler out of 5
  
  }break;
  
  case 'u':
  case 'U': {
  		make_fuse(&fuses[cur_fuse = (cur_fuse + 1) % MAX_FIREWORKS], 30, colors[RED], 0, .04, 0, .01, (&nozzles[5])->x, -1);
  		//sparkler out of 6
  
  }break;
  
  case 'i':
  case 'I': {
  		make_fuse(&fuses[cur_fuse = (cur_fuse + 1) % MAX_FIREWORKS], 30, colors[RED], 0, .04, 0, .01, (&nozzles[6])->x, -1);
  		//sparkler out of 7
  
  }break;

  case '+':
  case '=': {
    if (cur_variable == RADIUS) {
      cur_radius += 2;
    }
    if (cur_variable == DENSITY) {
      cur_density += 1;
    }
    if (cur_variable == QUANTITY) {
      cur_quantity += 5;
    }
    if (cur_variable == CUBE_SIZE) {
      cur_cube_size += .001;
    }
    if (cur_variable == AFTER_COUNTER) {
      cur_after_counter += 10;
    }
    print_cur();
  } break;

  case 'j': {
    light_screen = 1;
  } break;

  case '-':
  case '_': {
    if (cur_variable == RADIUS) {
      cur_radius -= 2;
    }
    if (cur_variable == DENSITY) {
      cur_density -= 1;
    }
    if (cur_variable == QUANTITY) {
      cur_quantity -= 5;
    }
    if (cur_variable == CUBE_SIZE) {
      cur_cube_size -= .001;
    }
    if (cur_variable == AFTER_COUNTER) {
      cur_after_counter -= 10;
    }
    print_cur();
  } break;


  case 'z': {
    music_playing = (music_playing + 1) % 2;
    if (music_playing) {
      BASS_ChannelPlay(sounds[8], FALSE);
    }
    else {
      BASS_ChannelPause(sounds[8]);
    }
  } break;



  case 'a':
  case 'A': {
    cur_variable = RADIUS;
    print_cur();
  } break;
  case 's':
  case 'S': {
    cur_variable = DENSITY;
    print_cur();
  } break;
  case 'd':
  case 'D': {
    cur_variable = QUANTITY;
    print_cur();
  } break;
  case 'f':
  case 'F': {
    cur_variable = CUBE_SIZE;
    print_cur();
  } break;
  case 'g':
  case 'G': {
    cur_variable = AFTER_COUNTER;
    print_cur();
  } break;

  case '1': {

    make_fuse(&fuses[cur_fuse = (cur_fuse + 1) % MAX_FIREWORKS], 30, colors[RED], 0, .04, 0, .01, (&nozzles[0])->x, (&nozzles[0])->y);
    BASS_ChannelPlay(sounds[9], TRUE);
    break;
  }
  case '2': {
    make_fuse(&fuses[cur_fuse = (cur_fuse + 1) % MAX_FIREWORKS], 30, colors[RED], 0, .04, 0, .01, (&nozzles[1])->x, (&nozzles[1])->y);
    BASS_ChannelPlay(sounds[10], TRUE);

    break;
  }
  case '3': {
    make_fuse(&fuses[cur_fuse = (cur_fuse + 1) % MAX_FIREWORKS], 30, colors[RED], 0, .04, 0, .01, (&nozzles[2])->x, (&nozzles[2])->y);
    BASS_ChannelPlay(sounds[11], TRUE);

    break;
  }
  case '4': {
    make_fuse(&fuses[cur_fuse = (cur_fuse + 1) % MAX_FIREWORKS], 30, colors[RED], 0, .04, 0, .01, (&nozzles[3])->x, (&nozzles[3])->y);
    BASS_ChannelPlay(sounds[12], TRUE);

    break;
  }
  case '5': {
    make_fuse(&fuses[cur_fuse = (cur_fuse + 1) % MAX_FIREWORKS], 30, colors[RED], 0, .04, 0, .01, (&nozzles[4])->x, (&nozzles[4])->y);
    BASS_ChannelPlay(sounds[13], TRUE);

    break;
  }
  case '6': {
    make_fuse(&fuses[cur_fuse = (cur_fuse + 1) % MAX_FIREWORKS], 30, colors[RED], 0, .04, 0, .01, (&nozzles[5])->x, (&nozzles[5])->y);
    BASS_ChannelPlay(sounds[14], TRUE);
  
    break;
  }
  case '7': {
    make_fuse(&fuses[cur_fuse = (cur_fuse + 1) % MAX_FIREWORKS], 30, colors[RED], 0, .04, 0, .01, (&nozzles[6])->x, (&nozzles[6])->y);
    BASS_ChannelPlay(sounds[15], TRUE);
   
    break;
  }

  default: break;
  }


  glutPostRedisplay();
}
Exemplo n.º 30
0
void CAudio::Pause()
{
	if(m_dwChannel != 0)
		BASS_ChannelPause(m_dwChannel);
}