[openal] OpenAL fails with OSS on FreeBSD

Daniel Gibson metalcaedes at gmail.com
Thu Dec 1 22:45:26 EST 2016


On 02.12.2016 04:37, Yuri wrote:
> On 12/01/2016 19:25, Chris Robinson wrote:
>>
>> https://github.com/qTox/qTox/blob/master/src/audio/audio.cpp#L404
>>
>> I think there might be a bug. It's taking a QString, converting it to
>> a UTF-8 QByteArray, and then using constData() to get a C-style
>> string. I don't believe that's guaranteed to be null-terminated
>> though, so if not it can have junk characters after the name and won't
>> be recognized.
>
>
> It is guaranteed to be 0-terminated:
> http://doc.qt.io/qt-4.8/qstring.html#constData
>

This is the correct method, I think:
http://doc.qt.io/qt-4.8/qbytearray.html#constData

Maybe for debugging purposes just set tmpDevName = "OSS  Default"; and 
see if things still fail?

>
> Yuri
>
> _______________________________________________
> openal mailing list
> openal at openal.org
> http://openal.org/mailman/listinfo/openal



More information about the openal mailing list