Int32 mixerIsChannelTypeActive(Mixer* mixer, Int32 type, Int32 reset) { int i; Int32 active = 0; updateVolumes(mixer); for (i = 0; i < mixer->channelCount; i++) { if (mixer->channels[i].type == type) { if (mixer->channels[i].active) { active = 1; } if (reset) { mixer->channels[i].active = 0; } } } return active; }
void update_guiFocusSettings(GUI *g, Controls *c) { Settings *s; NOT(g); NOT(c); s = &g->settings; updateMenuWidget(&s->menu, c); s->snd = false; if (goBack(c)) { g->next = s->previous; return; } switch (s->menu.focus) { case settingsFocusSfx: { int pvol; int idx = s->menu.focus - volMus; pvol = s->vol[idx]; s->vol[idx] = updateVolumes(s->vol[idx], c); if (pvol != s->vol[idx]) { s->snd = true; } break; } case settingsFocusControls: { if (submitted(c)) { g->next = guiFocusControls; } break; } default: break; } }
Int32 mixerGetChannelTypeVolume(Mixer* mixer, Int32 type, int leftRight) { int i; Int32 volume = 0; updateVolumes(mixer); if (type == MIXER_CHANNEL_MIDI) { return leftRight ? mixer->midi.volIntRight : mixer->midi.volIntLeft; } for (i = 0; i < mixer->channelCount; i++) { if (mixer->channels[i].type == type) { Int32 channelVol = leftRight ? mixer->channels[i].volIntRight : mixer->channels[i].volIntLeft; if (channelVol > volume) { volume = channelVol; } } } return volume; }
void QSoundManager::setMasterPercent(double percent) { _masterPercent = percent; updateVolumes(); }
void QSoundManager::setSpeechPercent(double percent) { _speechPercent = percent; updateVolumes(); }
void QSoundManager::setMusicPercent(double percent) { _musicPercent = percent; updateVolumes(); }
Int32 mixerGetMasterVolume(Mixer* mixer, int leftRight) { updateVolumes(mixer); return leftRight ? mixer->volIntRight : mixer->volIntLeft; }
WatsynInstrument::WatsynInstrument( InstrumentTrack * _instrument_track ) : Instrument( _instrument_track, &watsyn_plugin_descriptor ), a1_vol( 100.0f, 0.0f, 200.0f, 0.1f, this, tr( "Volume A1" ) ), a2_vol( 100.0f, 0.0f, 200.0f, 0.1f, this, tr( "Volume A2" ) ), b1_vol( 100.0f, 0.0f, 200.0f, 0.1f, this, tr( "Volume B1" ) ), b2_vol( 100.0f, 0.0f, 200.0f, 0.1f, this, tr( "Volume B2" ) ), a1_pan( 0.0f, -100.0f, 100.0f, 0.1f, this, tr( "Panning A1" ) ), a2_pan( 0.0f, -100.0f, 100.0f, 0.1f, this, tr( "Panning A2" ) ), b1_pan( 0.0f, -100.0f, 100.0f, 0.1f, this, tr( "Panning B1" ) ), b2_pan( 0.0f, -100.0f, 100.0f, 0.1f, this, tr( "Panning B2" ) ), a1_mult( 8.0f, 1.0, 24.0, 1.0, this, tr( "Freq. multiplier A1" ) ), a2_mult( 8.0f, 1.0, 24.0, 1.0, this, tr( "Freq. multiplier A2" ) ), b1_mult( 8.0f, 1.0, 24.0, 1.0, this, tr( "Freq. multiplier B1" ) ), b2_mult( 8.0f, 1.0, 24.0, 1.0, this, tr( "Freq. multiplier B2" ) ), a1_ltune( 0.0f, -600.0f, 600.0f, 1.0f, this, tr( "Left detune A1" ) ), a2_ltune( 0.0f, -600.0f, 600.0f, 1.0f, this, tr( "Left detune A2" ) ), b1_ltune( 0.0f, -600.0f, 600.0f, 1.0f, this, tr( "Left detune B1" ) ), b2_ltune( 0.0f, -600.0f, 600.0f, 1.0f, this, tr( "Left detune B2" ) ), a1_rtune( 0.0f, -600.0f, 600.0f, 1.0f, this, tr( "Right detune A1" ) ), a2_rtune( 0.0f, -600.0f, 600.0f, 1.0f, this, tr( "Right detune A2" ) ), b1_rtune( 0.0f, -600.0f, 600.0f, 1.0f, this, tr( "Right detune B1" ) ), b2_rtune( 0.0f, -600.0f, 600.0f, 1.0f, this, tr( "Right detune B2" ) ), a1_graph( -1.0f, 1.0f, GRAPHLEN, this ), a2_graph( -1.0f, 1.0f, GRAPHLEN, this ), b1_graph( -1.0f, 1.0f, GRAPHLEN, this ), b2_graph( -1.0f, 1.0f, GRAPHLEN, this ), m_abmix( 0.0f, -100.0f, 100.0f, 0.1f, this, tr( "A-B Mix" ) ), m_envAmt( 0.0f, -200.0f, 200.0f, 1.0f, this, tr( "A-B Mix envelope amount" ) ), m_envAtt( 0.0f, 0.0f, 2000.0f, 1.0f, 2000.0f, this, tr( "A-B Mix envelope attack" ) ), m_envHold( 0.0f, 0.0f, 2000.0f, 1.0f, 2000.0f, this, tr( "A-B Mix envelope hold" ) ), m_envDec( 0.0f, 0.0f, 2000.0f, 1.0f, 2000.0f, this, tr( "A-B Mix envelope decay" ) ), m_xtalk( 0.0f, 0.0f, 100.0f, 0.1f, this, tr( "A1-B2 Crosstalk" ) ), m_amod( 0, 0, 3, this, tr( "A2-A1 modulation" ) ), m_bmod( 0, 0, 3, this, tr( "B2-B1 modulation" ) ), m_selectedGraph( 0, 0, 3, this, tr( "Selected graph" ) ) { connect( &a1_vol, SIGNAL( dataChanged() ), this, SLOT( updateVolumes() ) ); connect( &a2_vol, SIGNAL( dataChanged() ), this, SLOT( updateVolumes() ) ); connect( &b1_vol, SIGNAL( dataChanged() ), this, SLOT( updateVolumes() ) ); connect( &b2_vol, SIGNAL( dataChanged() ), this, SLOT( updateVolumes() ) ); connect( &a1_pan, SIGNAL( dataChanged() ), this, SLOT( updateVolumes() ) ); connect( &a2_pan, SIGNAL( dataChanged() ), this, SLOT( updateVolumes() ) ); connect( &b1_pan, SIGNAL( dataChanged() ), this, SLOT( updateVolumes() ) ); connect( &b2_pan, SIGNAL( dataChanged() ), this, SLOT( updateVolumes() ) ); connect( &a1_mult, SIGNAL( dataChanged() ), this, SLOT( updateFreqA1() ) ); connect( &a2_mult, SIGNAL( dataChanged() ), this, SLOT( updateFreqA2() ) ); connect( &b1_mult, SIGNAL( dataChanged() ), this, SLOT( updateFreqB1() ) ); connect( &b2_mult, SIGNAL( dataChanged() ), this, SLOT( updateFreqB2() ) ); connect( &a1_ltune, SIGNAL( dataChanged() ), this, SLOT( updateFreqA1() ) ); connect( &a2_ltune, SIGNAL( dataChanged() ), this, SLOT( updateFreqA2() ) ); connect( &b1_ltune, SIGNAL( dataChanged() ), this, SLOT( updateFreqB1() ) ); connect( &b2_ltune, SIGNAL( dataChanged() ), this, SLOT( updateFreqB2() ) ); connect( &a1_rtune, SIGNAL( dataChanged() ), this, SLOT( updateFreqA1() ) ); connect( &a2_rtune, SIGNAL( dataChanged() ), this, SLOT( updateFreqA2() ) ); connect( &b1_rtune, SIGNAL( dataChanged() ), this, SLOT( updateFreqB1() ) ); connect( &b2_rtune, SIGNAL( dataChanged() ), this, SLOT( updateFreqB2() ) ); connect( &a1_graph, SIGNAL( samplesChanged( int, int ) ), this, SLOT( updateWaveA1() ) ); connect( &a2_graph, SIGNAL( samplesChanged( int, int ) ), this, SLOT( updateWaveA2() ) ); connect( &b1_graph, SIGNAL( samplesChanged( int, int ) ), this, SLOT( updateWaveB1() ) ); connect( &b2_graph, SIGNAL( samplesChanged( int, int ) ), this, SLOT( updateWaveB2() ) ); a1_graph.setWaveToSine(); a2_graph.setWaveToSine(); b1_graph.setWaveToSine(); b2_graph.setWaveToSine(); updateVolumes(); updateFreqA1(); updateFreqA2(); updateFreqB1(); updateFreqB2(); updateWaveA1(); updateWaveA2(); updateWaveB1(); updateWaveB2(); }