mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-19 17:11:15 +02:00
2023-12-18 Fred Gleason <fredg@paravelsystems.com>
* Fixed regressions in 'RDCae' and the HPI driver in caed(8) that caused the length of audio captures to be reported incorrectly. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -377,7 +377,7 @@ int RDHPIRecordStream::getPosition() const
|
||||
|
||||
unsigned RDHPIRecordStream::samplesRecorded() const
|
||||
{
|
||||
return samples_recorded;
|
||||
return samples_captured;
|
||||
}
|
||||
|
||||
|
||||
@@ -394,6 +394,7 @@ bool RDHPIRecordStream::recordReady()
|
||||
}
|
||||
if((!is_recording)&&(!is_paused)) {
|
||||
resetWave();
|
||||
samples_captured=0;
|
||||
if(LogHpi(HPI_InStreamGetInfoEx(NULL,hpi_stream,
|
||||
&state,&buffer_size,&data_recorded,
|
||||
&samples_recorded,&reserved),__LINE__)!=0) {
|
||||
@@ -599,6 +600,7 @@ void RDHPIRecordStream::pause()
|
||||
LogHpi(HPI_InStreamGetInfoEx(NULL,hpi_stream,&state,&buffer_size,
|
||||
&data_recorded,&samples_recorded,&reserved),
|
||||
__LINE__);
|
||||
samples_captured=samples_recorded;
|
||||
is_recording=false;
|
||||
is_paused=true;
|
||||
LogHpi(HPI_InStreamStart(NULL,hpi_stream),__LINE__);
|
||||
@@ -620,6 +622,7 @@ void RDHPIRecordStream::stop()
|
||||
LogHpi(HPI_InStreamStop(NULL,hpi_stream),__LINE__);
|
||||
tickClock();
|
||||
clock->stop();
|
||||
samples_captured=samples_recorded;
|
||||
is_recording=false;
|
||||
is_paused=false;
|
||||
is_ready=false;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// A class for recording Microsoft WAV files.
|
||||
//
|
||||
// (C) Copyright 2002-2015 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2023 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@@ -116,6 +116,7 @@ class RDHPIRecordStream : public QObject,public RDWaveFile
|
||||
uint32_t buffer_size;
|
||||
uint32_t data_recorded;
|
||||
uint32_t samples_recorded;
|
||||
uint32_t samples_captured;
|
||||
uint32_t reserved;
|
||||
uint32_t fragment_size;
|
||||
int fragment_time;
|
||||
|
Reference in New Issue
Block a user