alsa-devel-basic
i'm a student of computer engineering and information, and i planning to make an net application using an audio, it's like VoIP, for my paperwork.
The problem is, even if i'm not new in programming but, for audio programming i don't have any idea. There is some basic that i don't know.
- what is rate, period time, period size, period, tick time in *hw_params* means ? and what is used for ?
- what is xfer_align, start treshold, stop treshold, silence treshold in *sw_params* mean ?
and what is used for ?
- if i want to delay input (capture) and output (playback) for a milisecond what function must i used ? can both of delay (I/O) be different ?
neither alsa-doc/alsa-lib and Google don't help me much for that question.
thank you,
PS :
if you don't want to explain all the question, you can just give me a link to webpage that explain about audio programming, audio basic etc.
regards,
sho
[email protected]
__________________________________
Do you Yahoo!?
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Quoted 7 lines · On Mon, Mar 14, 2005 at 04:40:53AM -0800, _R3D__5T4R_ wrote:
i'm a student of computer engineering and information, and i planning to make an net application using an audio, it's like VoIP, for my paperwork.
The problem is, even if i'm not new in programming but, for audio programming i don't have any idea. There is some basic that i don't know.
http://www.linuxjournal.com/article/6735
(Note that the variable dir in the listings should be initialized to zero for the examples to work properly.)
(This article used to contain a good figure, but it seems to be gone.)
Quoted 2 lines
- what is rate, period time, period size, period, tick time in *hw_params* means ? and what is used for ?
The sound card hardware buffer is divided into periodes, which are divided into frames, which are divided into samples (one per channel), which are divided into bytes.
Asbj.S.
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
At Mon, 14 Mar 2005 04:40:53 -0800 (PST),
Quoted 11 lines · _R3D__5T4R_ wrote:
i'm a student of computer engineering and information, and i planning to make an net application using an audio, it's like VoIP, for my paperwork.
The problem is, even if i'm not new in programming but, for audio programming i don't have any idea. There is some basic that i don't know.
- what is rate, period time, period size, period, tick time in *hw_params* means ? and what is used for ?
hw_params are the essential settings for performing PCM transfer. At least, rate, format, channels, period_size (or time), buffer_size (time, or nperiods) must be defined.
rate = sample frequency, usually in Hz.
period = the period of interrupts DMA generates. Usually, a hardware buffer is set up as a certain number of (continuous) data chunks with equal sizes defined as period_size. (i.e., buffer_size = nperiods * period_size.) When the hardware processes period_size samples, it should generate an IRQ.
ALSA introduces the term "frame" to indicate the unit size to determine buffer and period sizes.
1 frame is defined as sample_bytes * channels. For example, with 2-channel 16bit samples, 1 frame corresponds to 4 bytes.
You don't need tick_time. Forget it :)
Quoted 3 lines
- what is
xfer_align, start treshold, stop treshold, silence treshold in *sw_params* mean ?
and what is used for ?
sw_params are additional optional settings. Skip this at first. If you face a problem that needs special tuning (e.g. delaying the DMA start, ignoring XRUN, etc.), check this again.
Quoted 3 lines
- if i want to delay input (capture) and output (playback) for a milisecond what function must i used ? can both of delay (I/O) be different ?
No special ALSA API for delay lines. You need to do it by yourself.
If you mean to program a low-latency full-duplex audio, you'd better to check JACK rather than writing directly with ALSA API.
Takashi
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click