modify alsa drivers to make use of new global fragment setting variables

git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1633 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2007-08-11 15:59:02 +00:00
parent 793f750429
commit e1100b5b20
2 changed files with 4 additions and 10 deletions

View file

@ -71,9 +71,6 @@ PA_MODULE_USAGE(
#define DEFAULT_DEVICE "default" #define DEFAULT_DEVICE "default"
#define DEFAULT_NFRAGS 4
#define DEFAULT_FRAGSIZE_MSEC 25
struct userdata { struct userdata {
pa_core *core; pa_core *core;
pa_module *module; pa_module *module;
@ -741,8 +738,8 @@ int pa__init(pa_module*m) {
frame_size = pa_frame_size(&ss); frame_size = pa_frame_size(&ss);
nfrags = DEFAULT_NFRAGS; nfrags = m->core->default_n_fragments;
frag_size = pa_usec_to_bytes(DEFAULT_FRAGSIZE_MSEC*1000, &ss); frag_size = pa_usec_to_bytes(m->core->default_fragment_size_msec*1000, &ss);
if (frag_size <= 0) if (frag_size <= 0)
frag_size = frame_size; frag_size = frame_size;

View file

@ -71,8 +71,6 @@ PA_MODULE_USAGE(
"mmap=<enable memory mapping?>") "mmap=<enable memory mapping?>")
#define DEFAULT_DEVICE "default" #define DEFAULT_DEVICE "default"
#define DEFAULT_NFRAGS 4
#define DEFAULT_FRAGSIZE_MSEC 25
struct userdata { struct userdata {
pa_core *core; pa_core *core;
@ -716,9 +714,8 @@ int pa__init(pa_module*m) {
frame_size = pa_frame_size(&ss); frame_size = pa_frame_size(&ss);
/* Fix latency to 100ms */ nfrags = m->core->default_n_fragments;
nfrags = DEFAULT_NFRAGS; frag_size = pa_usec_to_bytes(m->core->default_fragment_size_msec*1000, &ss);
frag_size = pa_usec_to_bytes(DEFAULT_FRAGSIZE_MSEC*1000, &ss);
if (frag_size <= 0) if (frag_size <= 0)
frag_size = frame_size; frag_size = frame_size;