Merge branch 'deltecent-hpi-timescale'

This commit is contained in:
Fred Gleason 2018-10-16 18:21:30 -04:00
commit 72c2b39ca5
2 changed files with 7 additions and 1 deletions

View File

@ -17780,3 +17780,7 @@
* Added rddbconfig(8).
2018-10-16 Fred Gleason <fredg@paravelsystems.com>
* Added a 'Rivendell->Configuration' menu entry for rddbconfig(8).
2018-10-16 Patrick Linstruth <patrick@deltecent.com>
* Fixed a bug that caused a gratuitious 'INALID_FUNC' error to
be sent to syslog when used with an ASI card without timescaling
support.

View File

@ -413,9 +413,11 @@ bool RDHPIPlayStream::play()
return false;
}
if((!playing)&&(!is_paused)) {
LogHpi(HPI_OutStreamSetTimeScale(NULL,hpi_stream,
if(sound_card->haveTimescaling(card_number)) {
LogHpi(HPI_OutStreamSetTimeScale(NULL,hpi_stream,
(uint16_t)((RD_TIMESCALE_DIVISOR/(double)play_speed)*
HPI_OSTREAM_TIMESCALE_UNITS)),__LINE__);
}
if(LogHpi(HPI_OutStreamGetInfoEx(NULL,hpi_stream,
&state,&buffer_size,&data_to_play,
&samples_played,&reserved),__LINE__)!=0) {