/[svn]/qsampler/trunk/src/qsamplerChannel.cpp
ViewVC logotype

Diff of /qsampler/trunk/src/qsamplerChannel.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 388 by capela, Thu Feb 17 17:27:59 2005 UTC revision 400 by capela, Mon Feb 21 15:02:58 2005 UTC
# Line 159  bool qsamplerChannel::loadEngine ( const Line 159  bool qsamplerChannel::loadEngine ( const
159  {  {
160      if (client() == NULL || m_iChannelID < 0)      if (client() == NULL || m_iChannelID < 0)
161          return false;          return false;
162            if (m_iInstrumentStatus == 100 && m_sEngineName == sEngineName)
163                return true;
164                
165      if (::lscp_load_engine(client(), sEngineName.latin1(), m_iChannelID) != LSCP_OK) {      if (::lscp_load_engine(client(), sEngineName.latin1(), m_iChannelID) != LSCP_OK) {
166          appendMessagesClient("lscp_load_engine");          appendMessagesClient("lscp_load_engine");
167          return false;          return false;
# Line 201  bool qsamplerChannel::loadInstrument ( c Line 203  bool qsamplerChannel::loadInstrument ( c
203          return false;          return false;
204          if (!isInstrumentFile(sInstrumentFile))          if (!isInstrumentFile(sInstrumentFile))
205              return false;              return false;
206            if (m_iInstrumentStatus == 100 && m_sInstrumentFile == sInstrumentFile && m_iInstrumentNr == iInstrumentNr)
207                return true;
208    
209      if (::lscp_load_instrument_non_modal(client(), sInstrumentFile.latin1(), iInstrumentNr, m_iChannelID) != LSCP_OK) {      if (::lscp_load_instrument_non_modal(client(), sInstrumentFile.latin1(), iInstrumentNr, m_iChannelID) != LSCP_OK) {
210          appendMessagesClient("lscp_load_instrument");          appendMessagesClient("lscp_load_instrument");
# Line 237  bool qsamplerChannel::setMidiDriver ( co Line 241  bool qsamplerChannel::setMidiDriver ( co
241  {  {
242      if (client() == NULL || m_iChannelID < 0)      if (client() == NULL || m_iChannelID < 0)
243          return false;          return false;
244            if (m_iInstrumentStatus == 100 && m_sMidiDriver == sMidiDriver)
245                return true;
246    
247      if (::lscp_set_channel_midi_type(client(), m_iChannelID, sMidiDriver.latin1()) != LSCP_OK) {      if (::lscp_set_channel_midi_type(client(), m_iChannelID, sMidiDriver.latin1()) != LSCP_OK) {
248          appendMessagesClient("lscp_set_channel_midi_type");          appendMessagesClient("lscp_set_channel_midi_type");
# Line 258  bool qsamplerChannel::setMidiDevice ( in Line 264  bool qsamplerChannel::setMidiDevice ( in
264  {  {
265      if (client() == NULL || m_iChannelID < 0)      if (client() == NULL || m_iChannelID < 0)
266          return false;          return false;
267            if (m_iInstrumentStatus == 100 && m_iMidiDevice == iMidiDevice)
268                return true;
269    
270      if (::lscp_set_channel_midi_device(client(), m_iChannelID, iMidiDevice) != LSCP_OK) {      if (::lscp_set_channel_midi_device(client(), m_iChannelID, iMidiDevice) != LSCP_OK) {
271          appendMessagesClient("lscp_set_channel_midi_device");          appendMessagesClient("lscp_set_channel_midi_device");
# Line 279  bool qsamplerChannel::setMidiPort ( int Line 287  bool qsamplerChannel::setMidiPort ( int
287  {  {
288      if (client() == NULL || m_iChannelID < 0)      if (client() == NULL || m_iChannelID < 0)
289          return false;          return false;
290            if (m_iInstrumentStatus == 100 && m_iMidiPort == iMidiPort)
291                return true;
292    
293      if (::lscp_set_channel_midi_port(client(), m_iChannelID, iMidiPort) != LSCP_OK) {      if (::lscp_set_channel_midi_port(client(), m_iChannelID, iMidiPort) != LSCP_OK) {
294          appendMessagesClient("lscp_set_channel_midi_port");          appendMessagesClient("lscp_set_channel_midi_port");
# Line 300  bool qsamplerChannel::setMidiChannel ( i Line 310  bool qsamplerChannel::setMidiChannel ( i
310  {  {
311      if (client() == NULL || m_iChannelID < 0)      if (client() == NULL || m_iChannelID < 0)
312          return false;          return false;
313            if (m_iInstrumentStatus == 100 && m_iMidiChannel == iMidiChannel)
314                return true;
315    
316      if (::lscp_set_channel_midi_channel(client(), m_iChannelID, iMidiChannel) != LSCP_OK) {      if (::lscp_set_channel_midi_channel(client(), m_iChannelID, iMidiChannel) != LSCP_OK) {
317          appendMessagesClient("lscp_set_channel_midi_channel");          appendMessagesClient("lscp_set_channel_midi_channel");
# Line 321  bool qsamplerChannel::setAudioDevice ( i Line 333  bool qsamplerChannel::setAudioDevice ( i
333  {  {
334      if (client() == NULL || m_iChannelID < 0)      if (client() == NULL || m_iChannelID < 0)
335          return false;          return false;
336            if (m_iInstrumentStatus == 100 && m_iAudioDevice == iAudioDevice)
337                return true;
338    
339      if (::lscp_set_channel_audio_device(client(), m_iChannelID, iAudioDevice) != LSCP_OK) {      if (::lscp_set_channel_audio_device(client(), m_iChannelID, iAudioDevice) != LSCP_OK) {
340          appendMessagesClient("lscp_set_channel_audio_device");          appendMessagesClient("lscp_set_channel_audio_device");
# Line 342  bool qsamplerChannel::setAudioDriver ( c Line 356  bool qsamplerChannel::setAudioDriver ( c
356  {  {
357      if (client() == NULL || m_iChannelID < 0)      if (client() == NULL || m_iChannelID < 0)
358          return false;          return false;
359            if (m_iInstrumentStatus == 100 && m_sAudioDriver == sAudioDriver)
360                return true;
361    
362      if (::lscp_set_channel_audio_type(client(), m_iChannelID, sAudioDriver.latin1()) != LSCP_OK) {      if (::lscp_set_channel_audio_type(client(), m_iChannelID, sAudioDriver.latin1()) != LSCP_OK) {
363          appendMessagesClient("lscp_set_channel_audio_type");          appendMessagesClient("lscp_set_channel_audio_type");
# Line 363  bool qsamplerChannel::setVolume ( float Line 379  bool qsamplerChannel::setVolume ( float
379  {  {
380      if (client() == NULL || m_iChannelID < 0)      if (client() == NULL || m_iChannelID < 0)
381          return false;          return false;
382            if (m_iInstrumentStatus == 100 && m_fVolume == fVolume)
383                return true;
384    
385      if (::lscp_set_channel_volume(client(), m_iChannelID, fVolume) != LSCP_OK) {      if (::lscp_set_channel_volume(client(), m_iChannelID, fVolume) != LSCP_OK) {
386          appendMessagesClient("lscp_set_channel_volume");          appendMessagesClient("lscp_set_channel_volume");
# Line 435  bool qsamplerChannel::updateChannelInfo Line 453  bool qsamplerChannel::updateChannelInfo
453    
454    
455  // Reset channel method.  // Reset channel method.
456  bool qsamplerChannel::resetChannel (void)  bool qsamplerChannel::channelReset (void)
457  {  {
458      if (client() == NULL || m_iChannelID < 0)      if (client() == NULL || m_iChannelID < 0)
459          return false;          return false;

Legend:
Removed from v.388  
changed lines
  Added in v.400

  ViewVC Help
Powered by ViewVC