|
|
@ -116,9 +116,9 @@ AudioIOAIX::AudioIOAIX()
|
|
|
|
int fd = openDevice();
|
|
|
|
int fd = openDevice();
|
|
|
|
if( fd >= 0 )
|
|
|
|
if( fd >= 0 )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
audio_status audioStatus;
|
|
|
|
audio_status audiotqStatus;
|
|
|
|
memset( &audioStatus, 0, sizeof(audio_status) );
|
|
|
|
memset( &audiotqStatus, 0, sizeof(audio_status) );
|
|
|
|
ioctl(fd, AUDIO_STATUS, &audioStatus);
|
|
|
|
ioctl(fd, AUDIO_STATUS, &audiotqStatus);
|
|
|
|
|
|
|
|
|
|
|
|
audio_buffer audioBuffer;
|
|
|
|
audio_buffer audioBuffer;
|
|
|
|
memset( &audioBuffer, 0, sizeof(audio_buffer) );
|
|
|
|
memset( &audioBuffer, 0, sizeof(audio_buffer) );
|
|
|
@ -129,14 +129,14 @@ AudioIOAIX::AudioIOAIX()
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* default parameters
|
|
|
|
* default parameters
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
param(samplingRate) = audioStatus.srate;
|
|
|
|
param(samplingRate) = audiotqStatus.srate;
|
|
|
|
param(fragmentSize) = audioStatus.bsize;
|
|
|
|
param(fragmentSize) = audiotqStatus.bsize;
|
|
|
|
param(fragmentCount) = audioBuffer.write_buf_cap / audioStatus.bsize;
|
|
|
|
param(fragmentCount) = audioBuffer.write_buf_cap / audiotqStatus.bsize;
|
|
|
|
param(channels) = audioStatus.channels;
|
|
|
|
param(channels) = audiotqStatus.channels;
|
|
|
|
param(direction) = 2;
|
|
|
|
param(direction) = 2;
|
|
|
|
|
|
|
|
|
|
|
|
param(format) = ( audioStatus.bits_per_sample==8 ) ? 8
|
|
|
|
param(format) = ( audiotqStatus.bits_per_sample==8 ) ? 8
|
|
|
|
: ( ( audioStatus.flags & AUDIO_BIG_ENDIAN ) ? 17 : 16 );
|
|
|
|
: ( ( audiotqStatus.flags & AUDIO_BIG_ENDIAN ) ? 17 : 16 );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|