Skip to main content
GameDev.net gamedev.net
🔒 Locked

XCode 4 and OpenAL

Started by Kostikov Stas Apr 18, 2011 at 7:18 AM 3 replies 2.4k views
Original Post
Kostikov Stas
Kostikov Stas
Have some strange trouble with XCode. I just start using XCode 4 and when i start testing OpenAL function alSourceQueueBuffers return -50 (alGetError). I try some things and fix it by switching compiler from LLVM to GCC... But may be there some other methods solve this problem?
bubu LV
bubu LV
Show the source code.
Kostikov Stas
Kostikov Stas

void cMacOsXSoundPlayer::fill_buffer( ALuint buffer )
{
uint8_t * ptr = 0;
size_t size = 0;
for( int i = 0; i< m_buffer->m_iNumberBuffers; i ++ )
{
if( m_buffer->m_Buffers[ i ] == buffer )
{
ptr = &m_buffer->m_Data[0];
size = m_buffer->m_Data.size();
break;
}
}

if( ptr )
{
size_t dwSize1 = m_sound->sound_data()->read( m_play_data, ptr, size );

if( dwSize1 > 0 )
{
alBufferData( buffer, m_buffer->m_format, ptr, dwSize1, m_buffer->m_freq );
alSourceQueueBuffers( m_buffer->m_source, 1, &buffer ); // after this call alGetError returns with -50 before this alGetError return 0

m_iUsedBuffers ++;
}
}
}
giacomogd1
giacomogd1
I'm having this very problem as well...

Bump!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.