160 |
} |
} |
161 |
|
|
162 |
/* Limited support to configure an opened audio port in IRIX The |
/* Limited support to configure an opened audio port in IRIX The |
163 |
number of channels is a static setting and can not be changed after |
number of channels is a static setting and can not be changed after |
164 |
a port is opened. So if the number of channels remains the same, we |
a port is opened. So if the number of channels remains the same, we |
165 |
can configure other settings Otherwise we have to reopen the audio |
can configure other settings Otherwise we have to reopen the audio |
166 |
port, using same config. */ |
port, using same config. */ |
167 |
|
|
168 |
channels = pwfx->nChannels; |
channels = pwfx->nChannels; |
169 |
g_snd_rate = pwfx->nSamplesPerSec; |
g_snd_rate = pwfx->nSamplesPerSec; |
170 |
|
|
171 |
alSetSampFmt(audioconfig, AL_SAMPFMT_TWOSCOMP); |
alSetSampFmt(audioconfig, AL_SAMPFMT_TWOSCOMP); |
172 |
alSetWidth(audioconfig, width); |
alSetWidth(audioconfig, width); |
173 |
if ( channels != alGetChannels(audioconfig) ) |
if (channels != alGetChannels(audioconfig)) |
174 |
{ |
{ |
175 |
alClosePort(output_port); |
alClosePort(output_port); |
176 |
alSetChannels(audioconfig, channels); |
alSetChannels(audioconfig, channels); |
179 |
if (output_port == (ALport) 0) |
if (output_port == (ALport) 0) |
180 |
{ |
{ |
181 |
fprintf(stderr, "wave_out_set_format: alOpenPort failed: %s\n", |
fprintf(stderr, "wave_out_set_format: alOpenPort failed: %s\n", |
182 |
alGetErrorString(oserror())); |
alGetErrorString(oserror())); |
183 |
return False; |
return False; |
184 |
} |
} |
185 |
|
|
319 |
if (out->p == out->end) |
if (out->p == out->end) |
320 |
{ |
{ |
321 |
gf = alGetFilled(output_port); |
gf = alGetFilled(output_port); |
322 |
if ( gf < (4 * maxFillable / 10) ) |
if (gf < (4 * maxFillable / 10)) |
323 |
{ |
{ |
324 |
rdpsnd_send_completion(packet->tick, packet->index); |
rdpsnd_send_completion(packet->tick, packet->index); |
325 |
free(out->data); |
free(out->data); |