2023-08-24 Fred Gleason <fredg@paravelsystems.com>

* Fixed a regression in the 'RDHPIPlayStream' that could cause
	audio play-out to be truncated.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2023-08-24 12:33:38 -04:00
parent 0f9cd5c116
commit d9e16f65a0
2 changed files with 10 additions and 5 deletions

View File

@@ -24362,3 +24362,6 @@
* Removed 'RDSetMixerPorts()' from 'lib/rdmixer.[cpp|h]'.
* Removed 'RDSetMixerOutputPort()' from 'lib/rdmixer.[cpp|h]'.
* Added a 'RDCae::setOutputPort()' method.
2023-08-24 Fred Gleason <fredg@paravelsystems.com>
* Fixed a regression in the 'RDHPIPlayStream' that could cause
audio play-out to be truncated.

View File

@@ -61,7 +61,6 @@ volatile static int stream_mutex[HPI_MAX_ADAPTERS][HPI_MAX_STREAMS]=
RDHPIPlayStream::RDHPIPlayStream(RDHPISoundCard *card,QWidget *parent)
:QObject(parent),RDWaveFile()
{
// hpi_err_t hpi_err;
int quan;
uint16_t type[HPI_MAX_ADAPTERS];
struct hpi_format fmt;
@@ -497,6 +496,7 @@ bool RDHPIPlayStream::play()
}
#endif
}
bool restart_timer=false;
if(!is_paused) {
memset(pdata,0,fragment_size);
left_to_write=getDataLength()-seekWave(0,SEEK_CUR);
@@ -524,10 +524,6 @@ bool RDHPIPlayStream::play()
playing=true;
is_paused=false;
stopping=false;
if(play_length>0) {
play_timer->start(play_length);
start_time=QTime::currentTime();
}
stream_state=RDHPIPlayStream::Playing;
if(!restart_transport) {
emit isStopped(false);
@@ -547,7 +543,13 @@ bool RDHPIPlayStream::play()
emit played();
emit stateChanged(card_number,stream_number,(int)stream_state);
}
restart_timer=true;
}
if((play_length>0)&&restart_timer) {
play_timer->start(play_length);
start_time=QTime::currentTime();
}
return true;
}