[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Hard coded sample rate in pulse driver.

From: Hynek Hanke
Subject: Hard coded sample rate in pulse driver.
Date: Thu, 12 Aug 2010 12:42:10 +0200

On 12.8.2010 07:44, Luke Yelavich wrote:
> While writing the recent patch I sent to the speechd list, I noticed that 
> there is a hard coded sample rate and channel count in the pulse driver.

Hello Luke,

I think you are looking at the values passed from pulse_open
to _pulse_open. pulse_open without underscore is called just once
when the output module initializes audio. _pulse_open (with
underscore) is called every time the sample rate, bps or other audio
parameter changes.

The only reason why we call _pulse_open() from pulse_open()
is to check whether connection to Pulse Audio is possible, which
can be done using any sample rate.

This was also the reason for the refactoring. Formerly, the rate
was set just at the beginning to a fixed value. If then we received
different audio data with different parameters from the synthesizer
(e.g. different voices have different rate, or sound icons).

It's possible that I overlooked something somewhere,
so feel free to ask more.

It is probably bad that we re-open the connection on every
sample rate change. I don't know if it is possible to overcome
this using the simple API though.

Best regards,
Hynek Hanke

reply via email to

[Prev in Thread] Current Thread [Next in Thread]