diff --git a/ChangeLog b/ChangeLog index ef0ace8e..af9fb385 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,12 +15,14 @@ * bug fix: for mono capture jack audio interface Jamulus complains it cannot make connections (Ticket #137) -TODO implement panning for channels (Ticket #52, #145) +TODO support CoreAudio aggregated devices TODO support internationalization TODO standard style: meter bar gets smaller sometimes if board is full and fader text is short +TODO implement panning for channels (Ticket #52, #145) + TODO sometimes I cannot see the central server in the server list TODO server: warning if Central server selected but OS location is different (e.g. US) -> warning in GUI and command line diff --git a/mac/sound.cpp b/mac/sound.cpp index 6a125b97..7bca3bdd 100755 --- a/mac/sound.cpp +++ b/mac/sound.cpp @@ -869,6 +869,56 @@ OSStatus CSound::callbackIO ( AudioDeviceID inDevice, GetSelCHAndAddCH ( iSelInputRightChannel, iNumInChan, iSelCHRight, iSelAddCHRight ); // check size (float32 has four bytes) +// if ( inInputData->mBuffers[0].mDataByteSize * inInputData->mNumberBuffers == +// (UInt32) iNumInChan * static_cast ( iCoreAudioBufferSizeMono * 4 ) ) +// { +// const int iNumChanPerFrame = iNumInChan / inInputData->mNumberBuffers; +// const int iSelBufferLeft = iSelCHLeft / iNumChanPerFrame; +// const int iSelBufferRight = iSelCHRight / iNumChanPerFrame; +// const int iSelInterlChLeft = iSelCHLeft % iNumChanPerFrame; +// const int iSelInterlChRight = iSelCHRight % iNumChanPerFrame; +// +// Float32* pLeftData = static_cast ( inInputData->mBuffers[iSelBufferLeft].mData ); +// Float32* pRightData = static_cast ( inInputData->mBuffers[iSelBufferRight].mData ); +// +// // copy input data +// for ( int i = 0; i < iCoreAudioBufferSizeMono; i++ ) +// { +// // copy left and right channels separately +// pSound->vecsTmpAudioSndCrdStereo[2 * i] = (short) ( pLeftData[iNumChanPerFrame * i + iSelInterlChLeft] * _MAXSHORT ); +// pSound->vecsTmpAudioSndCrdStereo[2 * i + 1] = (short) ( pRightData[iNumChanPerFrame * i + iSelInterlChRight] * _MAXSHORT ); +// } +// +// // add an additional optional channel +// if ( iSelAddCHLeft >= 0 ) +// { +// const int iSelAddCHBufferLeft = iSelAddCHLeft / iNumChanPerFrame; +// const int iSelAddCHInterlChLeft = iSelAddCHLeft % iNumChanPerFrame; +// +// pLeftData = static_cast ( inInputData->mBuffers[iSelAddCHBufferLeft].mData ); +// +// for ( int i = 0; i < iCoreAudioBufferSizeMono; i++ ) +// { +// pSound->vecsTmpAudioSndCrdStereo[2 * i] = Double2Short ( +// pSound->vecsTmpAudioSndCrdStereo[2 * i] + pLeftData[iNumChanPerFrame * i + iSelAddCHInterlChLeft] * _MAXSHORT ); +// } +// } +// +// if ( iSelAddCHRight >= 0 ) +// { +// const int iSelAddCHBufferRight = iSelAddCHRight / iNumChanPerFrame; +// const int iSelAddCHInterlChRight = iSelAddCHRight % iNumChanPerFrame; +// +// pRightData = static_cast ( inInputData->mBuffers[iSelAddCHBufferRight].mData ); +// +// for ( int i = 0; i < iCoreAudioBufferSizeMono; i++ ) +// { +// pSound->vecsTmpAudioSndCrdStereo[2 * i + 1] = Double2Short ( +// pSound->vecsTmpAudioSndCrdStereo[2 * i + 1] + pRightData[iNumChanPerFrame * i + iSelAddCHInterlChRight] * _MAXSHORT ); +// } +// } +// } +// else if ( inInputData->mBuffers[0].mDataByteSize == static_cast ( iCoreAudioBufferSizeMono * iNumInChan * 4 ) ) { @@ -954,6 +1004,27 @@ OSStatus CSound::callbackIO ( AudioDeviceID inDevice, if ( ( inDevice == pSound->CurrentAudioOutputDeviceID ) && outOutputData ) { // check size (float32 has four bytes) +// if ( inOutputData->mBuffers[0].mDataByteSize * inOutputData->mNumberBuffers == +// (UInt32) iNumOutChan * static_cast ( iCoreAudioBufferSizeMono * 4 ) ) +// { +// const int iNumChanPerFrame = iNumOutChan / inOutputData->mNumberBuffers; +// const int iSelBufferLeft = iSelOutputLeftChannel / iNumChanPerFrame; +// const int iSelBufferRight = iSelOutputRightChannel / iNumChanPerFrame; +// const int iSelInterlChLeft = iSelOutputLeftChannel % iNumChanPerFrame; +// const int iSelInterlChRight = iSelOutputRightChannel % iNumChanPerFrame; +// +// Float32* pLeftData = static_cast ( inOutputData->mBuffers[iSelBufferLeft].mData ); +// Float32* pRightData = static_cast ( inOutputData->mBuffers[iSelBufferRight].mData ); +// +// // copy output data +// for ( int i = 0; i < iCoreAudioBufferSizeMono; i++ ) +// { +// // copy left and right channels separately +// pLeftData[iNumChanPerFrame * i + iSelInterlChLeft] = (Float32) pSound->vecsTmpAudioSndCrdStereo[2 * i] / _MAXSHORT; +// pRightData[iNumChanPerFrame * i + iSelInterlChRight] = (Float32) pSound->vecsTmpAudioSndCrdStereo[2 * i] / _MAXSHORT; +// } +// } +// else if ( outOutputData->mBuffers[0].mDataByteSize == static_cast ( iCoreAudioBufferSizeMono * iNumOutChan * 4 ) ) {