Fixed various types to be suffixed with "_t".
This commit ensures that all defined data types in include/lmms_basics.h are
suffxed with "_t" to keep consistency as well as to fix issues on systems
with older STL/libstdc++.
(cherry picked from commit 7449c4f731)
This commit is contained in:
@@ -136,12 +136,12 @@ const automatableModel * automationPattern::firstObject( void ) const
|
||||
//TODO: Improve this
|
||||
midiTime automationPattern::length( void ) const
|
||||
{
|
||||
tick max_length = 0;
|
||||
tick_t max_length = 0;
|
||||
|
||||
for( timeMap::const_iterator it = m_timeMap.begin();
|
||||
it != m_timeMap.end(); ++it )
|
||||
{
|
||||
max_length = qMax<tick>( max_length, it.key() );
|
||||
max_length = qMax<tick_t>( max_length, it.key() );
|
||||
}
|
||||
return midiTime( qMax( midiTime( max_length ).getTact() + 1, 1 ), 0 );
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* bb_track_container.cpp - model-component of BB-Editor
|
||||
*
|
||||
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -93,7 +93,7 @@ void bbTrackContainer::updateAfterTrackAdd( void )
|
||||
|
||||
|
||||
|
||||
tact bbTrackContainer::lengthOfBB( int _bb )
|
||||
tact_t bbTrackContainer::lengthOfBB( int _bb )
|
||||
{
|
||||
midiTime max_length = midiTime::ticksPerTact();
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*
|
||||
* instrument_functions.cpp - models for instrument-function-tab
|
||||
*
|
||||
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -427,7 +427,8 @@ void arpeggiator::processNote( notePlayHandle * _n )
|
||||
// create new arp-note
|
||||
note new_note( midiTime( 0 ), midiTime( 0 ),
|
||||
sub_note_key,
|
||||
(volume) qRound( _n->getVolume() * vol_level ),
|
||||
(volume_t)
|
||||
qRound( _n->getVolume() * vol_level ),
|
||||
_n->getPanning(), _n->detuning() );
|
||||
|
||||
// create sub-note-play-handle, only ptr to note is different
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
|
||||
note::note( const midiTime & _length, const midiTime & _pos,
|
||||
int _key, volume _volume, panning _panning,
|
||||
int _key, volume_t _volume, panning_t _panning,
|
||||
detuningHelper * _detuning ) :
|
||||
m_selected( false ),
|
||||
m_oldKey( tLimit( _key, 0, NumKeys ) ),
|
||||
@@ -134,9 +134,9 @@ void note::setKey( const int _key )
|
||||
|
||||
|
||||
|
||||
void note::setVolume( const volume _volume )
|
||||
void note::setVolume( const volume_t _volume )
|
||||
{
|
||||
const volume v = tLimit( _volume, MinVolume, MaxVolume );
|
||||
const volume_t v = tLimit( _volume, MinVolume, MaxVolume );
|
||||
// addJournalEntry( journalEntry( ChangeVolume, (int) m_volume - v ) );
|
||||
m_volume = v;
|
||||
}
|
||||
@@ -144,9 +144,9 @@ void note::setVolume( const volume _volume )
|
||||
|
||||
|
||||
|
||||
void note::setPanning( const panning _panning )
|
||||
void note::setPanning( const panning_t _panning )
|
||||
{
|
||||
const panning p = tLimit( _panning, PanningLeft, PanningRight );
|
||||
const panning_t p = tLimit( _panning, PanningLeft, PanningRight );
|
||||
// addJournalEntry( journalEntry( ChangePanning, (int) m_panning - p ) );
|
||||
m_panning = p;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* note_play_handle.cpp - implementation of class notePlayHandle, part of
|
||||
* rendering engine
|
||||
*
|
||||
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -149,7 +149,7 @@ notePlayHandle::~notePlayHandle()
|
||||
|
||||
|
||||
|
||||
void notePlayHandle::setVolume( const volume _volume )
|
||||
void notePlayHandle::setVolume( const volume_t _volume )
|
||||
{
|
||||
note::setVolume( _volume );
|
||||
m_instrumentTrack->processOutEvent( midiEvent( MidiKeyPressure,
|
||||
|
||||
@@ -75,7 +75,7 @@ void sampleRecordHandle::play( sampleFrame * /*_working_buffer*/ )
|
||||
writeBuffer( recbuf, frames );
|
||||
m_framesRecorded += frames;
|
||||
|
||||
midiTime len = (tick)( m_framesRecorded / engine::framesPerTick() );
|
||||
midiTime len = (tick_t)( m_framesRecorded / engine::framesPerTick() );
|
||||
if( len > m_minLength )
|
||||
{
|
||||
// m_tco->changeLength( len );
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* song.cpp - root of the model-tree
|
||||
*
|
||||
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -62,7 +62,7 @@
|
||||
#include "timeline.h"
|
||||
|
||||
|
||||
tick midiTime::s_ticksPerTact = DefaultTicksPerTact;
|
||||
tick_t midiTime::s_ticksPerTact = DefaultTicksPerTact;
|
||||
|
||||
|
||||
|
||||
@@ -568,7 +568,7 @@ void song::updateLength( void )
|
||||
for( trackList::const_iterator it = tracks().begin();
|
||||
it != tracks().end(); ++it )
|
||||
{
|
||||
const tact cur = ( *it )->length();
|
||||
const tact_t cur = ( *it )->length();
|
||||
if( cur > m_length )
|
||||
{
|
||||
m_length = cur;
|
||||
@@ -580,7 +580,7 @@ void song::updateLength( void )
|
||||
|
||||
|
||||
|
||||
void song::setPlayPos( tick _ticks, PlayModes _play_mode )
|
||||
void song::setPlayPos( tick_t _ticks, PlayModes _play_mode )
|
||||
{
|
||||
m_playPos[_play_mode].setTicks( _ticks );
|
||||
m_playPos[_play_mode].setCurrentFrame( 0.0f );
|
||||
|
||||
@@ -238,7 +238,7 @@ void timeLine::paintEvent( QPaintEvent * )
|
||||
p.setOpacity( 1.0 );
|
||||
|
||||
|
||||
tact tact_num = m_begin.getTact();
|
||||
tact_t tact_num = m_begin.getTact();
|
||||
int x = m_xOffset + s_posMarkerPixmap->width() / 2 -
|
||||
( ( static_cast<Sint32>( m_begin * m_ppt ) /
|
||||
midiTime::ticksPerTact() ) %
|
||||
|
||||
@@ -1996,21 +1996,21 @@ void track::removeTact( const midiTime & _pos )
|
||||
* keeping track of the latest time found in ticks. Then we return
|
||||
* that in bars by dividing by the number of ticks per bar.
|
||||
*/
|
||||
tact track::length( void ) const
|
||||
tact_t track::length( void ) const
|
||||
{
|
||||
// find last end-position
|
||||
tick last = 0;
|
||||
tick_t last = 0;
|
||||
for( tcoVector::const_iterator it = m_trackContentObjects.begin();
|
||||
it != m_trackContentObjects.end(); ++it )
|
||||
{
|
||||
const tick cur = ( *it )->endPosition();
|
||||
const tick_t cur = ( *it )->endPosition();
|
||||
if( cur > last )
|
||||
{
|
||||
last = cur;
|
||||
}
|
||||
}
|
||||
|
||||
return( last / midiTime::ticksPerTact() );
|
||||
return last / midiTime::ticksPerTact();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1903,10 +1903,10 @@ void automationEditor::getSelectedValues( timeMap & _selected_values )
|
||||
++it )
|
||||
{
|
||||
//TODO: Add constant
|
||||
tick len_ticks = DefaultTicksPerTact / 16;
|
||||
tick_t len_ticks = DefaultTicksPerTact / 16;
|
||||
|
||||
float level = it.value();
|
||||
tick pos_ticks = it.key();
|
||||
tick_t pos_ticks = it.key();
|
||||
|
||||
if( level >= selLevel_start && level <= selLevel_end &&
|
||||
pos_ticks >= sel_pos_start &&
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* automation_pattern_view.cpp - implementation of view for automationPattern
|
||||
*
|
||||
* 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
|
||||
*
|
||||
@@ -215,7 +215,7 @@ void automationPatternView::paintEvent( QPaintEvent * )
|
||||
const int x_base = TCO_BORDER_WIDTH;
|
||||
p.setPen( QColor( 0, 0, 0 ) );
|
||||
|
||||
for( tact t = 1; t < m_pat->length().getTact(); ++t )
|
||||
for( tact_t t = 1; t < m_pat->length().getTact(); ++t )
|
||||
{
|
||||
p.drawLine( x_base + static_cast<int>( ppt * t ) - 1,
|
||||
TCO_BORDER_WIDTH, x_base + static_cast<int>(
|
||||
|
||||
@@ -1989,12 +1989,12 @@ void pianoRoll::mouseMoveEvent( QMouseEvent * _me )
|
||||
const noteVector & notes = m_pattern->notes();
|
||||
|
||||
// determine what volume/panning to set note to
|
||||
volume vol = tLimit<int>( MinVolume +
|
||||
volume_t vol = tLimit<int>( MinVolume +
|
||||
( ( (float)noteEditBottom() ) - ( (float)_me->y() ) ) /
|
||||
( (float)( noteEditBottom() - noteEditTop() ) ) *
|
||||
( MaxVolume - MinVolume ),
|
||||
MinVolume, MaxVolume );
|
||||
panning pan = tLimit<int>( PanningLeft +
|
||||
panning_t pan = tLimit<int>( PanningLeft +
|
||||
( (float)( noteEditBottom() - _me->y() ) ) /
|
||||
( (float)( noteEditBottom() - noteEditTop() ) ) *
|
||||
( (float)( PanningRight - PanningLeft ) ),
|
||||
|
||||
@@ -471,7 +471,7 @@ void songEditor::keyPressEvent( QKeyEvent * _ke )
|
||||
}
|
||||
else if( _ke->key() == Qt::Key_Left )
|
||||
{
|
||||
tick t = m_s->currentTick() - midiTime::ticksPerTact();
|
||||
tick_t t = m_s->currentTick() - midiTime::ticksPerTact();
|
||||
if( t >= 0 )
|
||||
{
|
||||
m_s->setPlayPos( t, song::Mode_PlaySong );
|
||||
@@ -479,7 +479,7 @@ void songEditor::keyPressEvent( QKeyEvent * _ke )
|
||||
}
|
||||
else if( _ke->key() == Qt::Key_Right )
|
||||
{
|
||||
tick t = m_s->currentTick() + midiTime::ticksPerTact();
|
||||
tick_t t = m_s->currentTick() + midiTime::ticksPerTact();
|
||||
if( t < MaxSongLength )
|
||||
{
|
||||
m_s->setPlayPos( t, song::Mode_PlaySong );
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*
|
||||
* bb_track.cpp - implementation of class bbTrack and bbTCO
|
||||
*
|
||||
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -53,7 +53,7 @@ bbTCO::bbTCO( track * _track, unsigned int _color ) :
|
||||
trackContentObject( _track ),
|
||||
m_color( _color > 0 ? _color : qRgb( 64, 128, 255 ) )
|
||||
{
|
||||
tact t = engine::getBBTrackContainer()->lengthOfBB(
|
||||
tact_t t = engine::getBBTrackContainer()->lengthOfBB(
|
||||
bbTrack::numOfBBTrack( getTrack() ) );
|
||||
if( t > 0 )
|
||||
{
|
||||
@@ -193,7 +193,7 @@ void bbTCOView::paintEvent( QPaintEvent * )
|
||||
lingrad.setColorAt( 1, col.light( 70 ) );
|
||||
p.fillRect( rect(), lingrad );
|
||||
|
||||
tact t = engine::getBBTrackContainer()->lengthOfBB(
|
||||
tact_t t = engine::getBBTrackContainer()->lengthOfBB(
|
||||
bbTrack::numOfBBTrack( m_bbTCO->getTrack() ) );
|
||||
if( m_bbTCO->length() > midiTime::ticksPerTact() && t > 0 )
|
||||
{
|
||||
|
||||
@@ -139,14 +139,14 @@ midiTime pattern::length( void ) const
|
||||
return beatPatternLength();
|
||||
}
|
||||
|
||||
tick max_length = midiTime::ticksPerTact();
|
||||
tick_t max_length = midiTime::ticksPerTact();
|
||||
|
||||
for( noteVector::const_iterator it = m_notes.begin();
|
||||
it != m_notes.end(); ++it )
|
||||
{
|
||||
if( ( *it )->length() > 0 )
|
||||
{
|
||||
max_length = qMax<tick>( max_length,
|
||||
max_length = qMax<tick_t>( max_length,
|
||||
( *it )->endPos() );
|
||||
}
|
||||
}
|
||||
@@ -159,14 +159,15 @@ midiTime pattern::length( void ) const
|
||||
|
||||
midiTime pattern::beatPatternLength( void ) const
|
||||
{
|
||||
tick max_length = midiTime::ticksPerTact();
|
||||
tick_t max_length = midiTime::ticksPerTact();
|
||||
|
||||
for( noteVector::const_iterator it = m_notes.begin();
|
||||
it != m_notes.end(); ++it )
|
||||
{
|
||||
if( ( *it )->length() < 0 )
|
||||
{
|
||||
max_length = qMax<tick>( max_length, ( *it )->pos() +
|
||||
max_length = qMax<tick_t>( max_length,
|
||||
( *it )->pos() +
|
||||
midiTime::ticksPerTact() /
|
||||
midiTime::stepsPerTact() );
|
||||
}
|
||||
@@ -618,7 +619,8 @@ void pattern::changeTimeSignature( void )
|
||||
++it;
|
||||
}
|
||||
}
|
||||
m_steps = qMax<tick>( qMax<tick>( m_steps, midiTime::stepsPerTact() ),
|
||||
m_steps = qMax<tick_t>(
|
||||
qMax<tick_t>( m_steps, midiTime::stepsPerTact() ),
|
||||
last_pos.getTact() * midiTime::stepsPerTact() );
|
||||
ensureBeatNotes();
|
||||
}
|
||||
@@ -1159,7 +1161,7 @@ void patternView::paintEvent( QPaintEvent * )
|
||||
const int x_base = TCO_BORDER_WIDTH;
|
||||
p.setPen( QColor( 0, 0, 0 ) );
|
||||
|
||||
for( tact t = 1; t < m_pat->length().getTact(); ++t )
|
||||
for( tact_t t = 1; t < m_pat->length().getTact(); ++t )
|
||||
{
|
||||
p.drawLine( x_base + static_cast<int>( ppt * t ) - 1,
|
||||
TCO_BORDER_WIDTH, x_base + static_cast<int>(
|
||||
|
||||
Reference in New Issue
Block a user