MIDI subsystem: fixed misspelled "writeable" into "writable", minor
coding style fixes
(cherry picked from commit 94d13e84ca)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* midi_alsa_seq.h - ALSA-sequencer-client
|
||||
*
|
||||
* Copyright (c) 2005-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -78,16 +78,16 @@ public:
|
||||
return( m_readablePorts );
|
||||
}
|
||||
|
||||
virtual QStringList writeablePorts( void ) const
|
||||
virtual QStringList writeblePorts( void ) const
|
||||
{
|
||||
return( m_writeablePorts );
|
||||
return m_writablePorts;
|
||||
}
|
||||
|
||||
// (un)subscribe given midiPort to/from destination-port
|
||||
virtual void subscribeReadablePort( midiPort * _port,
|
||||
const QString & _dest,
|
||||
bool _subscribe = TRUE );
|
||||
virtual void subscribeWriteablePort( midiPort * _port,
|
||||
virtual void subscribeWritablePort( midiPort * _port,
|
||||
const QString & _dest,
|
||||
bool _subscribe = TRUE );
|
||||
virtual void connectRPChanged( QObject * _receiver,
|
||||
@@ -100,7 +100,7 @@ public:
|
||||
virtual void connectWPChanged( QObject * _receiver,
|
||||
const char * _member )
|
||||
{
|
||||
connect( this, SIGNAL( writeablePortsChanged() ),
|
||||
connect( this, SIGNAL( writablePortsChanged() ),
|
||||
_receiver, _member );
|
||||
}
|
||||
|
||||
@@ -144,14 +144,14 @@ private:
|
||||
|
||||
QTimer m_portListUpdateTimer;
|
||||
QStringList m_readablePorts;
|
||||
QStringList m_writeablePorts;
|
||||
QStringList m_writablePorts;
|
||||
|
||||
int m_pipe[2];
|
||||
|
||||
|
||||
signals:
|
||||
void readablePortsChanged( void );
|
||||
void writeablePortsChanged( void );
|
||||
void writablePortsChanged( void );
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* midi_client.h - base-class for MIDI-clients like ALSA-sequencer-client
|
||||
*
|
||||
* Copyright (c) 2005-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -68,12 +68,12 @@ public:
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
// if not raw-client, return all readable/writeable ports
|
||||
// if not raw-client, return all readable/writable ports
|
||||
virtual QStringList readablePorts( void ) const
|
||||
{
|
||||
return QStringList();
|
||||
}
|
||||
virtual QStringList writeablePorts( void ) const
|
||||
virtual QStringList writablePorts( void ) const
|
||||
{
|
||||
return QStringList();
|
||||
}
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
virtual void subscribeReadablePort( midiPort * _port,
|
||||
const QString & _dest,
|
||||
bool _subscribe = TRUE );
|
||||
virtual void subscribeWriteablePort( midiPort * _port,
|
||||
virtual void subscribeWritablePort( midiPort * _port,
|
||||
const QString & _dest,
|
||||
bool _subscribe = TRUE );
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* midi_port.h - abstraction of MIDI-ports which are part of LMMS's MIDI-
|
||||
* sequencing system
|
||||
*
|
||||
* Copyright (c) 2005-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -113,7 +113,7 @@ public:
|
||||
|
||||
void subscribeReadablePort( const QString & _port,
|
||||
bool _subscribe = TRUE );
|
||||
void subscribeWriteablePort( const QString & _port,
|
||||
void subscribeWritablePort( const QString & _port,
|
||||
bool _subscribe = TRUE );
|
||||
|
||||
const map & readablePorts( void ) const
|
||||
@@ -136,7 +136,7 @@ public slots:
|
||||
|
||||
private slots:
|
||||
void updateReadablePorts( void );
|
||||
void updateWriteablePorts( void );
|
||||
void updateWritablePorts( void );
|
||||
void updateOutputProgram( void );
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ private:
|
||||
|
||||
signals:
|
||||
void readablePortsChanged( void );
|
||||
void writeablePortsChanged( void );
|
||||
void writablePortsChanged( void );
|
||||
void modeChanged( void );
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* midi_winmm.h - WinMM MIDI client
|
||||
*
|
||||
* Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2008-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -72,7 +72,7 @@ public:
|
||||
return( m_inputDevices.values() );
|
||||
}
|
||||
|
||||
virtual QStringList writeablePorts( void ) const
|
||||
virtual QStringList writeblePorts( void ) const
|
||||
{
|
||||
return( m_outputDevices.values() );
|
||||
}
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
virtual void subscribeReadablePort( midiPort * _port,
|
||||
const QString & _dest,
|
||||
bool _subscribe = TRUE );
|
||||
virtual void subscribeWriteablePort( midiPort * _port,
|
||||
virtual void subscribeWritablePort( midiPort * _port,
|
||||
const QString & _dest,
|
||||
bool _subscribe = TRUE );
|
||||
virtual void connectRPChanged( QObject * _receiver,
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
virtual void connectWPChanged( QObject * _receiver,
|
||||
const char * _member )
|
||||
{
|
||||
connect( this, SIGNAL( writeablePortsChanged() ),
|
||||
connect( this, SIGNAL( writablePortsChanged() ),
|
||||
_receiver, _member );
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ private:
|
||||
|
||||
signals:
|
||||
void readablePortsChanged( void );
|
||||
void writeablePortsChanged( void );
|
||||
void writablePortsChanged( void );
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*
|
||||
* midi_alsa_seq.cpp - ALSA-sequencer-client
|
||||
*
|
||||
* Copyright (c) 2005-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -350,7 +350,7 @@ void midiALSASeq::subscribeReadablePort( midiPort * _port,
|
||||
|
||||
|
||||
|
||||
void midiALSASeq::subscribeWriteablePort( midiPort * _port,
|
||||
void midiALSASeq::subscribeWritablePort( midiPort * _port,
|
||||
const QString & _dest,
|
||||
bool _subscribe )
|
||||
{
|
||||
@@ -544,7 +544,7 @@ void midiALSASeq::changeQueueTempo( bpm_t _bpm )
|
||||
void midiALSASeq::updatePortList( void )
|
||||
{
|
||||
QStringList readable_ports;
|
||||
QStringList writeable_ports;
|
||||
QStringList writable_ports;
|
||||
|
||||
// get input- and output-ports
|
||||
snd_seq_client_info_t * cinfo;
|
||||
@@ -586,7 +586,7 @@ void midiALSASeq::updatePortList( void )
|
||||
( SND_SEQ_PORT_CAP_WRITE |
|
||||
SND_SEQ_PORT_CAP_SUBS_WRITE ) )
|
||||
{
|
||||
writeable_ports.push_back(
|
||||
writable_ports.push_back(
|
||||
QString( "%1:%2 %3:%4" ).
|
||||
arg( snd_seq_port_info_get_client(
|
||||
pinfo ) ).
|
||||
@@ -606,13 +606,13 @@ void midiALSASeq::updatePortList( void )
|
||||
if( m_readablePorts != readable_ports )
|
||||
{
|
||||
m_readablePorts = readable_ports;
|
||||
emit( readablePortsChanged() );
|
||||
emit readablePortsChanged();
|
||||
}
|
||||
|
||||
if( m_writeablePorts != writeable_ports )
|
||||
if( m_writablePorts != writable_ports )
|
||||
{
|
||||
m_writeablePorts = writeable_ports;
|
||||
emit( writeablePortsChanged() );
|
||||
m_writablePorts = writable_ports;
|
||||
emit writablePortsChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*
|
||||
* midi_client.cpp - base-class for MIDI-clients like ALSA-sequencer-client
|
||||
*
|
||||
* Copyright (c) 2005-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* This file partly contains code from Fluidsynth, Peter Hanappe
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
@@ -94,7 +94,7 @@ void midiClient::subscribeReadablePort( midiPort *, const QString & , bool )
|
||||
|
||||
|
||||
|
||||
void midiClient::subscribeWriteablePort( midiPort * , const QString & , bool)
|
||||
void midiClient::subscribeWritablePort( midiPort * , const QString & , bool )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -76,13 +76,13 @@ midiPort::midiPort( const QString & _name, midiClient * _mc,
|
||||
if( m_midiClient->isRaw() == false )
|
||||
{
|
||||
updateReadablePorts();
|
||||
updateWriteablePorts();
|
||||
updateWritablePorts();
|
||||
|
||||
// we want to get informed about port-changes!
|
||||
m_midiClient->connectRPChanged( this,
|
||||
SLOT( updateReadablePorts() ) );
|
||||
m_midiClient->connectWPChanged( this,
|
||||
SLOT( updateWriteablePorts() ) );
|
||||
SLOT( updateWritablePorts() ) );
|
||||
}
|
||||
|
||||
updateMidiPortMode();
|
||||
@@ -269,7 +269,7 @@ void midiPort::loadSettings( const QDomElement & _this )
|
||||
subscribeReadablePort( it.key() );
|
||||
}
|
||||
}
|
||||
emit writeablePortsChanged();
|
||||
emit writablePortsChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ void midiPort::subscribeReadablePort( const QString & _port, bool _subscribe )
|
||||
|
||||
|
||||
|
||||
void midiPort::subscribeWriteablePort( const QString & _port, bool _subscribe )
|
||||
void midiPort::subscribeWritablePort( const QString & _port, bool _subscribe )
|
||||
{
|
||||
m_writablePorts[_port] = _subscribe;
|
||||
// make sure, MIDI-port is configured for output
|
||||
@@ -298,7 +298,7 @@ void midiPort::subscribeWriteablePort( const QString & _port, bool _subscribe )
|
||||
{
|
||||
m_writableModel.setValue( true );
|
||||
}
|
||||
m_midiClient->subscribeWriteablePort( this, _port, _subscribe );
|
||||
m_midiClient->subscribeWritablePort( this, _port, _subscribe );
|
||||
}
|
||||
|
||||
|
||||
@@ -336,13 +336,13 @@ void midiPort::updateMidiPortMode( void )
|
||||
// subscribed?
|
||||
if( it.value() )
|
||||
{
|
||||
subscribeWriteablePort( it.key(), false );
|
||||
subscribeWritablePort( it.key(), false );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
emit readablePortsChanged();
|
||||
emit writeablePortsChanged();
|
||||
emit writablePortsChanged();
|
||||
emit modeChanged();
|
||||
|
||||
engine::getSong()->setModified();
|
||||
@@ -377,7 +377,7 @@ void midiPort::updateReadablePorts( void )
|
||||
|
||||
|
||||
|
||||
void midiPort::updateWriteablePorts( void )
|
||||
void midiPort::updateWritablePorts( void )
|
||||
{
|
||||
// first save all selected ports
|
||||
QStringList selected_ports;
|
||||
@@ -391,13 +391,13 @@ void midiPort::updateWriteablePorts( void )
|
||||
}
|
||||
|
||||
m_writablePorts.clear();
|
||||
const QStringList & wp = m_midiClient->writeablePorts();
|
||||
const QStringList & wp = m_midiClient->writablePorts();
|
||||
// now insert new ports and restore selections
|
||||
for( QStringList::const_iterator it = wp.begin(); it != wp.end(); ++it )
|
||||
{
|
||||
m_writablePorts[*it] = ( selected_ports.indexOf( *it ) != -1 );
|
||||
}
|
||||
emit writeablePortsChanged();
|
||||
emit writablePortsChanged();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* midi_winmm.cpp - WinMM MIDI client
|
||||
*
|
||||
* Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2008-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -160,7 +160,7 @@ void midiWinMM::subscribeReadablePort( midiPort * _port,
|
||||
|
||||
|
||||
|
||||
void midiWinMM::subscribeWriteablePort( midiPort * _port,
|
||||
void midiWinMM::subscribeWritablePort( midiPort * _port,
|
||||
const QString & _dest,
|
||||
bool _subscribe )
|
||||
{
|
||||
@@ -260,13 +260,13 @@ void midiWinMM::updateDeviceList( void )
|
||||
// if( m_readablePorts != readable_ports )
|
||||
{
|
||||
// m_readablePorts = readable_ports;
|
||||
emit( readablePortsChanged() );
|
||||
emit readablePortsChanged();
|
||||
}
|
||||
|
||||
// if( m_writeablePorts != writeable_ports )
|
||||
// if( m_writablePorts != writable_ports )
|
||||
{
|
||||
// m_writeablePorts = writeable_ports;
|
||||
emit( writeablePortsChanged() );
|
||||
// m_writablePorts = writable_ports;
|
||||
emit writablePortsChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* midi_port_menu.cpp - a menu for subscribing a midiPort to several external
|
||||
* MIDI ports
|
||||
*
|
||||
* Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2008-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -58,7 +58,7 @@ void midiPortMenu::modelChanged( void )
|
||||
}
|
||||
else if( m_mode == midiPort::Output )
|
||||
{
|
||||
connect( mp, SIGNAL( writeablePortsChanged() ),
|
||||
connect( mp, SIGNAL( writablePortsChanged() ),
|
||||
this, SLOT( updatePorts() ) );
|
||||
}
|
||||
updatePorts();
|
||||
@@ -76,7 +76,7 @@ void midiPortMenu::activatedPort( QAction * _item )
|
||||
}
|
||||
else if( m_mode == midiPort::Output )
|
||||
{
|
||||
castModel<midiPort>()->subscribeWriteablePort( _item->text(),
|
||||
castModel<midiPort>()->subscribeWritablePort( _item->text(),
|
||||
_item->isChecked() );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user