Replaced [S/U]int[8/16/32] with types from stdint.h or plain integers
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* AudioDevice.h - base-class for audio-devices, used by LMMS-mixer
|
||||
*
|
||||
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -130,11 +130,11 @@ protected:
|
||||
|
||||
// convert a given audio-buffer to a buffer in signed 16-bit samples
|
||||
// returns num of bytes in outbuf
|
||||
Uint32 convertToS16( const surroundSampleFrame * _ab,
|
||||
const fpp_t _frames,
|
||||
const float _master_gain,
|
||||
int_sample_t * _output_buffer,
|
||||
const bool _convert_endian = FALSE );
|
||||
int convertToS16( const surroundSampleFrame * _ab,
|
||||
const fpp_t _frames,
|
||||
const float _master_gain,
|
||||
int_sample_t * _output_buffer,
|
||||
const bool _convert_endian = false );
|
||||
|
||||
// clear given signed-int-16-buffer
|
||||
void clearS16Buffer( int_sample_t * _outbuf,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* AudioDummy.h - dummy audio-device
|
||||
*
|
||||
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -95,19 +95,14 @@ private:
|
||||
while( true )
|
||||
{
|
||||
timer.reset();
|
||||
const surroundSampleFrame * b =
|
||||
mixer()->nextBuffer();
|
||||
const surroundSampleFrame* b = mixer()->nextBuffer();
|
||||
if( !b )
|
||||
{
|
||||
break;
|
||||
}
|
||||
delete[] b;
|
||||
|
||||
const Sint32 microseconds = static_cast<Sint32>(
|
||||
mixer()->framesPerPeriod() *
|
||||
1000000.0f /
|
||||
mixer()->processingSampleRate() -
|
||||
timer.elapsed() );
|
||||
const int microseconds = static_cast<int>( mixer()->framesPerPeriod() * 1000000.0f / mixer()->processingSampleRate() - timer.elapsed() );
|
||||
if( microseconds > 0 )
|
||||
{
|
||||
usleep( microseconds );
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* AudioFileDevice.h - base-class for audio-device-classes which write
|
||||
* their output into a file
|
||||
*
|
||||
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
|
||||
|
||||
protected:
|
||||
Sint32 writeData( const void * _data, Sint32 _len );
|
||||
int writeData( const void* data, int len );
|
||||
|
||||
inline bool useVBR() const
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* AudioFileOgg.h - Audio-device which encodes wave-stream and writes it
|
||||
* into an OGG-file. This is used for song-export.
|
||||
*
|
||||
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -75,7 +75,7 @@ private:
|
||||
|
||||
bool startEncoding();
|
||||
void finishEncoding();
|
||||
inline Sint32 writePage();
|
||||
inline int writePage();
|
||||
|
||||
|
||||
bool m_ok;
|
||||
@@ -86,7 +86,7 @@ private:
|
||||
bitrate_t m_minBitrate;
|
||||
bitrate_t m_maxBitrate;
|
||||
|
||||
Uint32 m_serialNo;
|
||||
uint32_t m_serialNo;
|
||||
|
||||
vorbis_comment * m_comments;
|
||||
|
||||
|
||||
@@ -37,8 +37,7 @@ public:
|
||||
virtual ~AutomationTrack();
|
||||
|
||||
virtual bool play( const midiTime & _start, const fpp_t _frames,
|
||||
const f_cnt_t _frame_base,
|
||||
Sint16 _tco_num = -1 );
|
||||
const f_cnt_t _frame_base, int _tco_num = -1 );
|
||||
|
||||
virtual QString nodeName() const
|
||||
{
|
||||
|
||||
@@ -69,7 +69,7 @@ private:
|
||||
QScrollArea * m_scrollArea;
|
||||
QPushButton * m_addButton;
|
||||
|
||||
Uint32 m_lastY;
|
||||
int m_lastY;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Effect.h - base class for effects
|
||||
*
|
||||
* Copyright (c) 2006-2007 Danny McRae <khjklujn/at/users.sourceforge.net>
|
||||
* Copyright (c) 2006-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -101,11 +101,8 @@ public:
|
||||
|
||||
inline f_cnt_t timeout() const
|
||||
{
|
||||
const float samples =
|
||||
engine::mixer()->processingSampleRate() *
|
||||
m_autoQuitModel.value() / 1000.0f;
|
||||
return 1 + ( static_cast<Uint32>( samples ) /
|
||||
engine::mixer()->framesPerPeriod() );
|
||||
const float samples = engine::mixer()->processingSampleRate() * m_autoQuitModel.value() / 1000.0f;
|
||||
return 1 + ( static_cast<int>( samples ) / engine::mixer()->framesPerPeriod() );
|
||||
}
|
||||
|
||||
inline float wetLevel() const
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* effect_rack_view.h - view for effectChain-model
|
||||
*
|
||||
* Copyright (c) 2006-2007 Danny McRae <khjklujn@netscape.net>
|
||||
* Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -79,7 +79,7 @@ private:
|
||||
groupBox * m_effectsGroupBox;
|
||||
QScrollArea * m_scrollArea;
|
||||
|
||||
Uint32 m_lastY;
|
||||
int m_lastY;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* InstrumentFunctions.h - models for instrument-functions-tab
|
||||
*
|
||||
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
static const int MAX_CHORD_POLYPHONY = 10;
|
||||
|
||||
private:
|
||||
typedef Sint8 ChordSemiTones [MAX_CHORD_POLYPHONY];
|
||||
typedef int8_t ChordSemiTones [MAX_CHORD_POLYPHONY];
|
||||
|
||||
public:
|
||||
ChordCreator( Model * _parent );
|
||||
@@ -90,9 +90,9 @@ public:
|
||||
return size() == 0;
|
||||
}
|
||||
|
||||
bool hasSemiTone( Sint8 semi_tone ) const;
|
||||
bool hasSemiTone( int8_t semiTone ) const;
|
||||
|
||||
Sint8 last() const
|
||||
int8_t last() const
|
||||
{
|
||||
return m_semiTones[size() - 1];
|
||||
}
|
||||
@@ -102,7 +102,7 @@ public:
|
||||
return m_name;
|
||||
}
|
||||
|
||||
Sint8 operator [] ( int n ) const
|
||||
int8_t operator [] ( int n ) const
|
||||
{
|
||||
return m_semiTones[n];
|
||||
}
|
||||
|
||||
@@ -120,8 +120,7 @@ public:
|
||||
|
||||
// play everything in given frame-range - creates note-play-handles
|
||||
virtual bool play( const midiTime & _start, const fpp_t _frames,
|
||||
const f_cnt_t _frame_base,
|
||||
Sint16 _tco_num = -1 );
|
||||
const f_cnt_t _frame_base, int _tco_num = -1 );
|
||||
// create new view for me
|
||||
virtual trackView * createView( TrackContainerView* tcv );
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* LadspaBase.h - basic declarations concerning LADSPA
|
||||
*
|
||||
* Copyright (c) 2006-2007 Danny McRae <khjklujn/at/users.sourceforge.net>
|
||||
* Copyright (c) 2006-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -55,8 +55,8 @@ typedef struct PortDescription
|
||||
{
|
||||
QString name;
|
||||
ch_cnt_t proc;
|
||||
Uint16 port_id;
|
||||
Uint16 control_id;
|
||||
uint16_t port_id;
|
||||
uint16_t control_id;
|
||||
buffer_rate_t rate;
|
||||
buffer_data_t data_type;
|
||||
float scale;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* LadspaControl.h - model for controlling a LADSPA port
|
||||
*
|
||||
* Copyright (c) 2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2006-2008 Danny McRae <khjklujn/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
@@ -72,8 +72,7 @@ public:
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent,
|
||||
const QString & _name );
|
||||
virtual void loadSettings( const QDomElement & _this,
|
||||
const QString & _name );
|
||||
virtual void loadSettings( const QDomElement & _this, const QString & _name );
|
||||
inline virtual QString nodeName() const
|
||||
{
|
||||
return "port";
|
||||
@@ -81,8 +80,8 @@ public:
|
||||
|
||||
|
||||
signals:
|
||||
void changed( Uint16 _port, LADSPA_Data _value );
|
||||
void linkChanged( Uint16 _port, bool _state );
|
||||
void changed( int _port, LADSPA_Data _value );
|
||||
void linkChanged( int _port, bool _state );
|
||||
|
||||
|
||||
protected slots:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* MidiAlsaRaw.h - midi-client for RawMIDI via ALSA
|
||||
* MidiAlsaRaw.h - MIDI client for RawMIDI via ALSA
|
||||
*
|
||||
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
|
||||
|
||||
protected:
|
||||
virtual void sendByte( const Uint8 _c );
|
||||
virtual void sendByte( const unsigned char c );
|
||||
virtual void run();
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* MidiClient.h - base-class for MIDI clients like ALSA-sequencer-client
|
||||
*
|
||||
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -140,7 +140,7 @@ protected:
|
||||
|
||||
|
||||
|
||||
const Uint8 RAW_MIDI_PARSE_BUF_SIZE = 16;
|
||||
const int RAW_MIDI_PARSE_BUF_SIZE = 16;
|
||||
|
||||
|
||||
class MidiClientRaw : public MidiClient
|
||||
@@ -158,37 +158,35 @@ public:
|
||||
|
||||
protected:
|
||||
// generic raw-MIDI-parser which generates appropriate MIDI-events
|
||||
void parseData( const Uint8 _c );
|
||||
void parseData( const unsigned char c );
|
||||
|
||||
// to be implemented by actual client-implementation
|
||||
virtual void sendByte( const Uint8 _c ) = 0;
|
||||
virtual void sendByte( const unsigned char c ) = 0;
|
||||
|
||||
|
||||
private:
|
||||
// this does MIDI-event-process
|
||||
void processParsedEvent();
|
||||
virtual void processOutEvent( const midiEvent & _me,
|
||||
const midiTime & _time,
|
||||
const MidiPort * _port );
|
||||
virtual void processOutEvent( const midiEvent& event, const midiTime& time, const MidiPort* port );
|
||||
|
||||
// small helper function returning length of a certain event - this
|
||||
// is necessary for parsing raw-MIDI-data
|
||||
static Uint8 eventLength( const Uint8 _event );
|
||||
static int eventLength( const unsigned char event );
|
||||
|
||||
|
||||
// data being used for parsing
|
||||
struct midiParserData
|
||||
{
|
||||
Uint8 m_status; // identifies the type of event, that
|
||||
uint8_t m_status; // identifies the type of event, that
|
||||
// is currently received ('Noteon',
|
||||
// 'Pitch Bend' etc).
|
||||
Uint8 m_channel; // The channel of the event that is
|
||||
uint8_t m_channel; // The channel of the event that is
|
||||
// received (in case of a channel event)
|
||||
Uint32 m_bytes; // How many bytes have been read for
|
||||
uint32_t m_bytes; // How many bytes have been read for
|
||||
// the current event?
|
||||
Uint32 m_bytesTotal; // How many bytes does the current
|
||||
uint32_t m_bytesTotal; // How many bytes does the current
|
||||
// event type include?
|
||||
Uint32 m_buffer[RAW_MIDI_PARSE_BUF_SIZE];
|
||||
uint32_t m_buffer[RAW_MIDI_PARSE_BUF_SIZE];
|
||||
// buffer for incoming data
|
||||
midiEvent m_midiEvent; // midi-event
|
||||
} m_midiParseData;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* MidiOss.h - OSS raw MIDI client
|
||||
*
|
||||
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
|
||||
|
||||
protected:
|
||||
virtual void sendByte( const Uint8 _c );
|
||||
virtual void sendByte( const unsigned char c );
|
||||
virtual void run();
|
||||
|
||||
|
||||
|
||||
@@ -122,8 +122,7 @@ public:
|
||||
virtual ~SampleTrack();
|
||||
|
||||
virtual bool play( const midiTime & _start, const fpp_t _frames,
|
||||
const f_cnt_t _frame_base,
|
||||
Sint16 _tco_num = -1 );
|
||||
const f_cnt_t _frame_base, int _tco_num = -1 );
|
||||
virtual trackView * createView( TrackContainerView* tcv );
|
||||
virtual trackContentObject * createTCO( const midiTime & _pos );
|
||||
|
||||
|
||||
@@ -109,10 +109,8 @@ public:
|
||||
bbTrack( TrackContainer* tc );
|
||||
virtual ~bbTrack();
|
||||
|
||||
virtual bool play( const midiTime & _start,
|
||||
const fpp_t _frames,
|
||||
const f_cnt_t _frame_base,
|
||||
Sint16 _tco_num = -1 );
|
||||
virtual bool play( const midiTime & _start, const fpp_t _frames,
|
||||
const f_cnt_t _frame_base, int _tco_num = -1 );
|
||||
virtual trackView * createView( TrackContainerView* tcv );
|
||||
virtual trackContentObject * createTCO( const midiTime & _pos );
|
||||
|
||||
|
||||
@@ -39,8 +39,7 @@ public:
|
||||
virtual ~bbTrackContainer();
|
||||
|
||||
virtual bool play( midiTime _start, const fpp_t _frames,
|
||||
const f_cnt_t _frame_base,
|
||||
Sint16 _tco_num = -1 );
|
||||
const f_cnt_t _frame_base, int _tco_num = -1 );
|
||||
|
||||
virtual void updateAfterTrackAdd();
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* cpuload_widget.h - widget for displaying CPU-load (partly based on
|
||||
* Hydrogen's CPU-load-widget)
|
||||
*
|
||||
* Copyright (c) 2005-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -51,7 +51,7 @@ protected slots:
|
||||
|
||||
|
||||
private:
|
||||
Uint8 m_currentLoad;
|
||||
int m_currentLoad;
|
||||
|
||||
QPixmap m_temp;
|
||||
QPixmap m_background;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* endian_handling.h - handle endianess
|
||||
*
|
||||
* Copyright (c) 2005-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
@@ -22,7 +22,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _ENDIAN_HANDLING_H
|
||||
#define _ENDIAN_HANDLING_H
|
||||
|
||||
@@ -37,18 +36,18 @@ inline bool isLittleEndian()
|
||||
}
|
||||
|
||||
|
||||
inline Sint16 swap16IfBE( Sint16 _i )
|
||||
inline int16_t swap16IfBE( int16_t i )
|
||||
{
|
||||
return( isLittleEndian() ? _i : ( ( _i & 0xFF ) << 8) | ( ( _i >> 8 ) & 0xFF ) );
|
||||
return( isLittleEndian() ? i : ( ( i & 0xFF ) << 8) | ( ( i >> 8 ) & 0xFF ) );
|
||||
}
|
||||
|
||||
|
||||
inline Sint32 swap32IfBE( Sint32 _i )
|
||||
inline int32_t swap32IfBE( int32_t i )
|
||||
{
|
||||
return( isLittleEndian() ? _i : ( ( _i & 0xff000000 ) >> 24 ) |
|
||||
( ( _i & 0x00ff0000 ) >> 8 ) |
|
||||
( ( _i & 0x0000ff00 ) << 8 ) |
|
||||
( ( _i & 0x000000ff ) << 24 ) );
|
||||
return( isLittleEndian() ? i : ( ( i & 0xff000000 ) >> 24 ) |
|
||||
( ( i & 0x00ff0000 ) >> 8 ) |
|
||||
( ( i & 0x0000ff00 ) << 8 ) |
|
||||
( ( i & 0x000000ff ) << 24 ) );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -73,10 +73,10 @@ enum ladspaPluginType
|
||||
typedef struct ladspaManagerStorage
|
||||
{
|
||||
LADSPA_Descriptor_Function descriptorFunction;
|
||||
Uint32 index;
|
||||
uint32_t index;
|
||||
ladspaPluginType type;
|
||||
Uint16 inputChannels;
|
||||
Uint16 outputChannels;
|
||||
uint16_t inputChannels;
|
||||
uint16_t outputChannels;
|
||||
} ladspaManagerDescription;
|
||||
|
||||
|
||||
@@ -123,20 +123,20 @@ public:
|
||||
|
||||
/* This indicates the number of ports (input AND output) present on
|
||||
the plugin. */
|
||||
Uint32 getPortCount( const ladspa_key_t & _plugin );
|
||||
uint32_t getPortCount( const ladspa_key_t & _plugin );
|
||||
|
||||
|
||||
/* Indicates that the port is an input. */
|
||||
bool isPortInput( const ladspa_key_t & _plugin, Uint32 _port );
|
||||
bool isPortInput( const ladspa_key_t & _plugin, uint32_t _port );
|
||||
|
||||
/* Indicates that the port is an output. */
|
||||
bool isPortOutput( const ladspa_key_t & _plugin, Uint32 _port );
|
||||
bool isPortOutput( const ladspa_key_t & _plugin, uint32_t _port );
|
||||
|
||||
/* Indicates that the port is an audio. */
|
||||
bool isPortAudio( const ladspa_key_t & _plugin, Uint32 _port );
|
||||
bool isPortAudio( const ladspa_key_t & _plugin, uint32_t _port );
|
||||
|
||||
/* Indicates that the port is an control. */
|
||||
bool isPortControl( const ladspa_key_t & _plugin, Uint32 _port );
|
||||
bool isPortControl( const ladspa_key_t & _plugin, uint32_t _port );
|
||||
|
||||
/* Indicates that any bounds specified should be interpreted as
|
||||
multiples of the sample rate. For instance, a frequency range from
|
||||
@@ -145,42 +145,42 @@ public:
|
||||
Hosts that support bounds at all must support this hint to retain
|
||||
meaning. */
|
||||
bool areHintsSampleRateDependent( const ladspa_key_t & _plugin,
|
||||
Uint32 _port );
|
||||
uint32_t _port );
|
||||
|
||||
/* Returns the lower boundary value for the given port. If
|
||||
no lower bound is provided by the plug-in, returns -999e-99. When
|
||||
areHintsSampleRateDependent() is also true then this value should be
|
||||
multiplied by the relevant sample rate. */
|
||||
float getLowerBound( const ladspa_key_t & _plugin, Uint32 _port );
|
||||
float getLowerBound( const ladspa_key_t & _plugin, uint32_t _port );
|
||||
|
||||
/* Returns the upper boundary value for the given port. If
|
||||
no upper bound is provided by the plug-in, returns -999e-99. When
|
||||
areHintsSampleRateDependent() is also true then this value should be
|
||||
multiplied by the relevant sample rate. */
|
||||
float getUpperBound( const ladspa_key_t & _plugin, Uint32 _port );
|
||||
float getUpperBound( const ladspa_key_t & _plugin, uint32_t _port );
|
||||
|
||||
/* Indicates whether the given port should be considered 0 or 1
|
||||
boolean switch. */
|
||||
bool isPortToggled( const ladspa_key_t & _plugin, Uint32 _port );
|
||||
bool isPortToggled( const ladspa_key_t & _plugin, uint32_t _port );
|
||||
|
||||
/* Retrieves any default setting hints offered by the plug-in for
|
||||
the given port. */
|
||||
float getDefaultSetting( const ladspa_key_t & _plugin, Uint32 _port );
|
||||
float getDefaultSetting( const ladspa_key_t & _plugin, uint32_t _port );
|
||||
|
||||
/* Indicates that it is likely that the user will find it more
|
||||
intuitive to view values using a logarithmic scale. This is
|
||||
particularly useful for frequencies and gains. */
|
||||
bool isLogarithmic( const ladspa_key_t & _plugin, Uint32 _port );
|
||||
bool isLogarithmic( const ladspa_key_t & _plugin, uint32_t _port );
|
||||
|
||||
/* Indicates that a user interface would probably wish to provide a
|
||||
stepped control taking only integer values. Any bounds set should be
|
||||
slightly wider than the actual integer range required to avoid floating
|
||||
point rounding errors. For instance, the integer set {0,1,2,3} might
|
||||
be described as [-0.1, 3.1]. */
|
||||
bool isInteger( const ladspa_key_t & _plugin, Uint32 _port );
|
||||
bool isInteger( const ladspa_key_t & _plugin, uint32_t _port );
|
||||
|
||||
/* Returns the name of the port. */
|
||||
QString getPortName( const ladspa_key_t & _plugin, Uint32 _port );
|
||||
QString getPortName( const ladspa_key_t & _plugin, uint32_t _port );
|
||||
|
||||
|
||||
/* This may be used by the plugin developer to pass any custom
|
||||
@@ -206,7 +206,7 @@ public:
|
||||
|
||||
/* Returns a handle to an instantiation of the given plug-in. */
|
||||
LADSPA_Handle instantiate( const ladspa_key_t & _plugin,
|
||||
Uint32 _sample_rate );
|
||||
uint32_t _sample_rate );
|
||||
|
||||
/* This method calls a function pointer that connects a port on an
|
||||
instantiated plugin to a memory location at which a block of data
|
||||
@@ -227,7 +227,7 @@ public:
|
||||
run() or runAdding() is called. */
|
||||
bool connectPort( const ladspa_key_t & _plugin,
|
||||
LADSPA_Handle _instance,
|
||||
Uint32 _port,
|
||||
uint32_t _port,
|
||||
LADSPA_Data * _data_location );
|
||||
|
||||
/* This method calls a function pointer that initialises a plugin
|
||||
@@ -264,7 +264,7 @@ public:
|
||||
activate() has been called again. */
|
||||
bool run( const ladspa_key_t & _plugin,
|
||||
LADSPA_Handle _instance,
|
||||
Uint32 _sample_count );
|
||||
uint32_t _sample_count );
|
||||
|
||||
/* This method calls a function pointer that runs an instance of a
|
||||
plugin for a block. This has identical behaviour to run() except
|
||||
@@ -281,7 +281,7 @@ public:
|
||||
the function setRunAddingGain() must be provided also. */
|
||||
bool runAdding( const ladspa_key_t & _plugin,
|
||||
LADSPA_Handle _instance,
|
||||
Uint32 _sample_count );
|
||||
uint32_t _sample_count );
|
||||
|
||||
/* This method calls a function pointer that sets the output gain for
|
||||
use when runAdding() is called (see above). If this function is
|
||||
@@ -325,8 +325,8 @@ public:
|
||||
private:
|
||||
void addPlugins( LADSPA_Descriptor_Function _descriptor_func,
|
||||
const QString & _file );
|
||||
Uint16 getPluginInputs( const LADSPA_Descriptor * _descriptor );
|
||||
Uint16 getPluginOutputs( const LADSPA_Descriptor * _descriptor );
|
||||
uint16_t getPluginInputs( const LADSPA_Descriptor * _descriptor );
|
||||
uint16_t getPluginOutputs( const LADSPA_Descriptor * _descriptor );
|
||||
|
||||
typedef QMap<ladspa_key_t, ladspaManagerDescription *>
|
||||
ladspaManagerMapType;
|
||||
|
||||
@@ -34,35 +34,26 @@
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
typedef unsigned char Uint8;
|
||||
typedef signed char Sint8;
|
||||
typedef unsigned short Uint16;
|
||||
typedef signed short Sint16;
|
||||
typedef unsigned int Uint32;
|
||||
typedef signed int Sint32;
|
||||
|
||||
|
||||
typedef Uint32 minute_t;
|
||||
typedef Sint8 second_t;
|
||||
typedef Sint32 tact_t;
|
||||
typedef Sint32 tick_t;
|
||||
typedef Uint8 volume_t;
|
||||
typedef Sint8 panning_t;
|
||||
typedef int32_t tact_t;
|
||||
typedef int32_t tick_t;
|
||||
typedef uint8_t volume_t;
|
||||
typedef int8_t panning_t;
|
||||
|
||||
|
||||
typedef float sample_t; // standard sample-type
|
||||
typedef Sint16 int_sample_t; // 16-bit-int-sample
|
||||
typedef int16_t int_sample_t; // 16-bit-int-sample
|
||||
|
||||
|
||||
typedef Uint32 sample_rate_t; // sample-rate
|
||||
typedef Sint16 fpp_t; // frames per period (0-16384)
|
||||
typedef Sint32 f_cnt_t; // standard frame-count
|
||||
typedef Uint8 ch_cnt_t; // channel-count (0-SURROUND_CHANNELS)
|
||||
typedef Uint16 bpm_t; // tempo (MIN_BPM to MAX_BPM)
|
||||
typedef Uint16 bitrate_t; // bitrate in kbps
|
||||
typedef Sint8 fx_ch_t; // FX-channel (0 to MAX_EFFECT_CHANNEL)
|
||||
typedef uint32_t sample_rate_t; // sample-rate
|
||||
typedef int16_t fpp_t; // frames per period (0-16384)
|
||||
typedef int32_t f_cnt_t; // standard frame-count
|
||||
typedef uint8_t ch_cnt_t; // channel-count (0-SURROUND_CHANNELS)
|
||||
typedef uint16_t bpm_t; // tempo (MIN_BPM to MAX_BPM)
|
||||
typedef uint16_t bitrate_t; // bitrate in kbps
|
||||
typedef uint16_t fx_ch_t; // FX-channel (0 to MAX_EFFECT_CHANNEL)
|
||||
|
||||
typedef Uint32 jo_id_t; // (unique) ID of a journalling object
|
||||
typedef uint32_t jo_id_t; // (unique) ID of a journalling object
|
||||
|
||||
// use for improved branch prediction
|
||||
#define likely(x) __builtin_expect((x),1)
|
||||
|
||||
@@ -124,9 +124,9 @@ const int MidiMinPanning = -128;
|
||||
struct midiEvent
|
||||
{
|
||||
midiEvent( MidiEventTypes _type = MidiActiveSensing,
|
||||
Sint8 _channel = 0,
|
||||
Sint16 _param1 = 0,
|
||||
Sint16 _param2 = 0,
|
||||
int8_t _channel = 0,
|
||||
int16_t _param1 = 0,
|
||||
int16_t _param2 = 0,
|
||||
const void * _sourcePort = NULL ) :
|
||||
m_type( _type ),
|
||||
m_metaEvent( MidiMetaInvalid ),
|
||||
@@ -172,12 +172,12 @@ struct midiEvent
|
||||
return m_channel;
|
||||
}
|
||||
|
||||
inline Sint16 key() const
|
||||
inline int16_t key() const
|
||||
{
|
||||
return m_data.m_param[0];
|
||||
}
|
||||
|
||||
inline Sint16 & key()
|
||||
inline int16_t & key()
|
||||
{
|
||||
return m_data.m_param[0];
|
||||
}
|
||||
@@ -192,17 +192,17 @@ struct midiEvent
|
||||
return m_data.m_param[1];
|
||||
}
|
||||
|
||||
inline Sint16 velocity() const
|
||||
inline int16_t velocity() const
|
||||
{
|
||||
return m_data.m_param[1];
|
||||
}
|
||||
|
||||
inline Sint16 & velocity()
|
||||
inline int16_t & velocity()
|
||||
{
|
||||
return m_data.m_param[1];
|
||||
}
|
||||
|
||||
inline Sint16 midiPanning() const
|
||||
inline int16_t midiPanning() const
|
||||
{
|
||||
return m_data.m_param[1];
|
||||
}
|
||||
@@ -237,12 +237,12 @@ struct midiEvent
|
||||
|
||||
MidiEventTypes m_type; // MIDI event type
|
||||
MidiMetaEvents m_metaEvent; // Meta event (mostly unused)
|
||||
Sint8 m_channel; // MIDI channel
|
||||
int8_t m_channel; // MIDI channel
|
||||
union
|
||||
{
|
||||
Sint16 m_param[2]; // first/second parameter (key/velocity)
|
||||
Uint8 m_bytes[4]; // raw bytes
|
||||
Sint32 m_sysExDataLen; // len of m_sysExData
|
||||
int16_t m_param[2]; // first/second parameter (key/velocity)
|
||||
uint8_t m_bytes[4]; // raw bytes
|
||||
int32_t m_sysExDataLen; // len of m_sysExData
|
||||
} m_data;
|
||||
|
||||
const char * m_sysExData;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* mmp.h - class for reading and writing multimedia-project-files
|
||||
*
|
||||
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2012-2013 Paul Giblock <p/at/pgiblock.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
@@ -104,10 +104,9 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
const Uint8 MMP_MAJOR_VERSION = 1;
|
||||
const Uint8 MMP_MINOR_VERSION = 0;
|
||||
const QString MMP_VERSION_STRING = QString::number( MMP_MAJOR_VERSION ) + "." +
|
||||
QString::number( MMP_MINOR_VERSION );
|
||||
const int MMP_MAJOR_VERSION = 1;
|
||||
const int MMP_MINOR_VERSION = 0;
|
||||
const QString MMP_VERSION_STRING = QString::number( MMP_MAJOR_VERSION ) + "." + QString::number( MMP_MINOR_VERSION );
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -284,7 +284,7 @@ private:
|
||||
actions m_action;
|
||||
noteEditMode m_noteEditMode;
|
||||
|
||||
Uint32 m_selectStartTick;
|
||||
int m_selectStartTick;
|
||||
int m_selectedTick;
|
||||
int m_selectStartKey;
|
||||
int m_selectedKeys;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* track.h - declaration of classes concerning tracks -> necessary for all
|
||||
* track-like objects (beat/bassline, sample-track...)
|
||||
*
|
||||
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -64,8 +64,8 @@ const int TRACK_OP_WIDTH_COMPACT = 60;
|
||||
* Tracks can be resized by shift-dragging anywhere inside the track
|
||||
* display. This sets the minimum size in pixels for a track.
|
||||
*/
|
||||
const Uint16 MINIMAL_TRACK_HEIGHT = 8;
|
||||
const Uint16 DEFAULT_TRACK_HEIGHT = 32;
|
||||
const int MINIMAL_TRACK_HEIGHT = 8;
|
||||
const int DEFAULT_TRACK_HEIGHT = 32;
|
||||
|
||||
const int TCO_BORDER_WIDTH = 1;
|
||||
|
||||
@@ -224,7 +224,7 @@ private:
|
||||
trackView * m_trackView;
|
||||
Actions m_action;
|
||||
bool m_autoResize;
|
||||
Sint16 m_initialMouseX;
|
||||
int m_initialMouseX;
|
||||
|
||||
textFloat * m_hint;
|
||||
|
||||
@@ -380,8 +380,7 @@ public:
|
||||
}
|
||||
|
||||
virtual bool play( const midiTime & _start, const fpp_t _frames,
|
||||
const f_cnt_t _frame_base,
|
||||
Sint16 _tco_num = -1 ) = 0;
|
||||
const f_cnt_t _frame_base, int _tco_num = -1 ) = 0;
|
||||
|
||||
|
||||
virtual trackView * createView( TrackContainerView * _view ) = 0;
|
||||
|
||||
Reference in New Issue
Block a user