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