Minor formatting changes

This commit is contained in:
Hyunjin Song
2022-02-03 13:19:24 +09:00
parent 99d97fcc35
commit dfed374c0d
5 changed files with 16 additions and 16 deletions

View File

@@ -352,7 +352,7 @@ const surroundSampleFrame * AudioEngine::renderNextBuffer()
if( it != m_playHandles.end() )
{
if((*it)->audioPort()) { (*it)->audioPort()->removePlayHandle(*it); }
if ((*it)->audioPort()) { (*it)->audioPort()->removePlayHandle(*it); }
if( ( *it )->type() == PlayHandle::TypeNotePlayHandle )
{
NotePlayHandleManager::release( (NotePlayHandle*) *it );
@@ -400,7 +400,7 @@ const surroundSampleFrame * AudioEngine::renderNextBuffer()
}
if( ( *it )->isFinished() )
{
if((*it)->audioPort()) { (*it)->audioPort()->removePlayHandle(*it); }
if ((*it)->audioPort()) { (*it)->audioPort()->removePlayHandle(*it); }
if( ( *it )->type() == PlayHandle::TypeNotePlayHandle )
{
NotePlayHandleManager::release( (NotePlayHandle*) *it );
@@ -753,7 +753,7 @@ void AudioEngine::removePlayHandlesOfTypes(Track * track, const quint8 types)
{
if ((*it)->isFromTrack(track) && ((*it)->type() & types))
{
if (( *it )->audioPort()) { (*it)->audioPort()->removePlayHandle(*it); }
if ((*it)->audioPort()) { (*it)->audioPort()->removePlayHandle(*it); }
if( ( *it )->type() == PlayHandle::TypeNotePlayHandle )
{
NotePlayHandleManager::release( (NotePlayHandle*) *it );

View File

@@ -33,7 +33,7 @@
#include "debug.h"
SampleRecordHandle::SampleRecordHandle(SampleClip* clip , TimePos startRecordTimeOffset) :
SampleRecordHandle::SampleRecordHandle(SampleClip* clip, TimePos startRecordTimeOffset) :
PlayHandle( TypeSamplePlayHandle ),
m_framesRecorded( 0 ),
m_minLength( clip->length() ),

View File

@@ -68,7 +68,7 @@ void SampleClipView::constructContextMenu(QMenu* cm)
cm->addSeparator();
cm->addAction(embed::getIconPixmap( "record" ),
cm->addAction(embed::getIconPixmap("record"),
tr("Set/clear record"),
m_clip, SLOT(toggleRecord()));
@@ -291,7 +291,7 @@ void SampleClipView::paintEvent( QPaintEvent * pe )
}
// recording sample tracks is not possible at the moment
if(m_clip->isRecord())
if (m_clip->isRecord())
{
p.setFont( pointSize<7>( p.font() ) );

View File

@@ -1028,7 +1028,7 @@ SongEditorWindow::SongEditorWindow(Song* song) :
// In case our current audio device does not support capture,
// disable the record buttons.
if(!Engine::audioEngine()->audioDev()->supportsCapture()) {
for(auto &recordAction : {m_recordAccompanyAction, m_recordAction}) {
for (auto &recordAction : {m_recordAccompanyAction, m_recordAction}) {
recordAction->setEnabled(false);
recordAction->setToolTip(tr("Recording is unavailable: try connecting an input device or switching backend"));
}

View File

@@ -95,8 +95,8 @@ bool SampleTrack::play( const TimePos & _start, const fpp_t _frames,
if( _start >= sClip->startPosition() && _start < sClip->endPosition() )
{
if(!sClip->isPlaying() && (_start >= (sClip->startPosition() + sClip->startTimeOffset())
|| sClip->isRecord()))
if (!sClip->isPlaying() && (_start >= (sClip->startPosition() + sClip->startTimeOffset())
|| sClip->isRecord()))
{
auto bufferFramesPerTick = Engine::framesPerTick (sClip->sampleBuffer ()->sampleRate ());
f_cnt_t sampleStart = bufferFramesPerTick * ( _start - sClip->startPosition() - sClip->startTimeOffset() );
@@ -107,18 +107,18 @@ bool SampleTrack::play( const TimePos & _start, const fpp_t _frames,
f_cnt_t samplePlayLength = clipFrameLength > sampleBufferLength ? sampleBufferLength : clipFrameLength;
// In case we are recoding, "play" the whole TCO.
if(sClip->isRecord()) {
if (sClip->isRecord()) {
samplePlayLength = clipFrameLength;
}
//we only play within the sampleBuffer limits
//Ignore that in case of recoding.
if(sampleStart < sampleBufferLength || sClip->isRecord ())
if (sampleStart < sampleBufferLength || sClip->isRecord())
{
sClip->setSampleStartFrame(sampleStart);
sClip->setSamplePlayLength(samplePlayLength);
clips.push_back(sClip);
sClip->setIsPlaying(true);
sClip->setSampleStartFrame( sampleStart );
sClip->setSamplePlayLength( samplePlayLength );
clips.push_back( sClip );
sClip->setIsPlaying( true );
nowPlaying = true;
}
}
@@ -138,7 +138,7 @@ bool SampleTrack::play( const TimePos & _start, const fpp_t _frames,
if( !st->isMuted() )
{
PlayHandle* handle;
if(st->isRecord())
if( st->isRecord() )
{
if( !Engine::getSong()->isRecording() )
{