[00:57:12] *** zeroclouds has joined #openal[00:57:12] *** ChanServ sets mode: +v zeroclouds[01:49:06] *** D0pamine has quit IRC[01:52:49] *** neXyon has joined #openal[01:52:49] *** ChanServ sets mode: +v neXyon[02:46:46] *** Smirftsch1 has joined #openal[02:46:59] *** ChanServ sets mode: +v Smirftsch1[02:49:13] *** Smirftsch has quit IRC[03:30:57] *** neXyon_ has joined #openal[03:30:57] *** ChanServ sets mode: +v neXyon_[03:31:47] *** neXyon has quit IRC[03:58:40] *** neXyon__ has joined #openal[03:58:40] *** ChanServ sets mode: +v neXyon__[03:58:59] *** neXyon_ has quit IRC[04:30:49] *** lritter has quit IRC[04:51:09] *** neXyon__ is now known as neXyon[05:40:46] *** lritter has joined #openal[05:40:46] *** ChanServ sets mode: +v lritter[06:24:48] *** neXyon has quit IRC[06:26:06] *** neXyon has joined #openal[06:26:06] *** ChanServ sets mode: +v neXyon[07:19:23] *** bjz has joined #openal[07:19:23] *** ChanServ sets mode: +v bjz[07:39:21] *** lritter has quit IRC[07:49:26] *** tristanseifert has quit IRC[08:27:52] *** bjz_ has joined #openal[08:27:52] *** ChanServ sets mode: +v bjz_[08:29:38] *** bjz has quit IRC[08:54:20] *** neXyon has quit IRC[08:54:50] *** neXyon has joined #openal[08:54:50] *** ChanServ sets mode: +v neXyon[09:13:31] *** neXyon has quit IRC[09:33:49] *** tristanseifert has joined #openal[09:33:49] *** ChanServ sets mode: +v tristanseifert[09:37:30] *** CapsAdmine has joined #openal[09:37:30] *** ChanServ sets mode: +v CapsAdmine[09:38:53] *** tristanseifert has quit IRC[09:40:46] *** CapsAdmin has quit IRC[10:06:45] *** zeroclouds has quit IRC[11:22:40] *** tristanseifert has joined #openal[11:22:40] *** ChanServ sets mode: +v tristanseifert[11:27:22] *** tristanseifert has quit IRC[11:37:03] *** BrainDamage has quit IRC[11:41:39] *** BrainDamage has joined #openal[11:41:39] *** ChanServ sets mode: +v BrainDamage[11:46:29] *** prophile has joined #openal[11:46:29] *** ChanServ sets mode: +v prophile[13:11:51] *** tristanseifert has joined #openal[13:12:04] *** ChanServ sets mode: +v tristanseifert[13:16:26] *** tristanseifert has quit IRC[13:48:59] *** prophile has quit IRC[14:19:01] *** kornerr1 has joined #openal[14:19:01] *** ChanServ sets mode: +v kornerr1[14:25:43] *** rmk0 has quit IRC[14:30:35] *** D0pamine has joined #openal[14:30:35] *** ChanServ sets mode: +v D0pamine[14:41:21] *** rmk0 has joined #openal[14:41:21] *** ChanServ sets mode: +v rmk0[14:42:07] *** tristanseifert has joined #openal[14:42:07] *** ChanServ sets mode: +v tristanseifert[14:52:33] *** tristanseifert has quit IRC[15:31:13] *** zeroclouds has joined #openal[15:31:13] *** ChanServ sets mode: +v zeroclouds[15:43:52] *** joelt has joined #openal[15:43:52] *** ChanServ sets mode: +v joelt[15:49:00] *** joelt has quit IRC[16:26:52] *** joelt has joined #openal[16:27:04] *** ChanServ sets mode: +v joelt[16:28:48] <joelt> i have a "rusty on c"/openal question: Im reading bytes from the mic AL_FORMAT_MONO16, reading 1024 samples results in the ALbyte array being populated with 2048 bytes, presumably shorts? How do I convert those bytes to my float array instead?[17:12:40] *** prophile has joined #openal[17:12:41] *** ChanServ sets mode: +v prophile[17:23:05] *** kornerr1 has quit IRC[17:37:46] <rdb> joelt, by iterating over it and converting each short to a float. However, you could also use OpenAL Soft's AL_EXT_float32 extension.[17:38:54] *** take_cheeze has quit IRC[17:38:55] *** prophile has quit IRC[17:46:41] <joelt> that AL_EXT_float32 doesn't seem to be defined in al.h (at least in XCode)[17:48:37] <joelt> rdb: are the extensions in general cross-platform?[17:49:04] <rdb> The extensions depend on the implementation. If you use OpenAL Soft on all platforms, then yes.[17:49:34] <rdb> I don't know if Apple's OpenAL implementation has AL_EXT_float32.[17:50:29] <joelt> if i use OpenAL on osx, does that mean i have to ship an openal lib?[17:50:41] <rdb> By the way, extensions are in alext.h[17:50:51] <joelt> ah.[17:51:37] <rdb> You would have to check for presence of the extension at runtime, though, unless you are sure that the implementation supports it.[17:52:03] <rdb> The extension adds two formats: AL_FORMAT_MONO_FLOAT32 and AL_FORMAT_STEREO_FLOAT32.[17:54:49] <joelt> k' doesn't look like XCode has it... actually no file called alext.h[17:55:01] <joelt> i think the convert is probably right for me.[17:55:26] <joelt> rdb: does this conversion look right? short val = (short)( ((buffer[i*2] & 0xFF)<<8) | (buffer[i*2+1] & 0xFF) ); or is there a simpler way?[17:55:50] <joelt> is there a way thru simple casting?[17:56:03] <rdb> Er, yes, but you'd have to double-check on endianness issues...[17:56:34] <joelt> i think that means whether the high byte is the low byte or vice versa?[17:56:36] <rdb> short val = *((short *)(buffer + i * 2));[17:56:51] <rdb> But that assumes that the buffer is in system byte order.[17:57:03] <rdb> Actually, better idea...[17:57:12] <rdb> short *buffer_short = (short *)buffer;[17:57:17] *** prophile has joined #openal[17:57:17] *** ChanServ sets mode: +v prophile[17:57:25] <rdb> short val = buffer_short[i];[17:57:49] <joelt> ah thx. ill give that a shot.[18:10:31] <joelt> rdb: looks like that's likely working, thx.[18:12:00] <rdb> joelt, Cool. Double-check on the documentation that OpenAL indeed packs the shorts in native byte-order, though.[18:46:34] <joelt> k[18:48:17] <joelt> The simplest supported format for buffer data is PCM. PCM data is assumed to use the[18:48:17] <joelt> processor's native byte order. Other formats use the byte order native to that format.[20:36:55] *** lritter has joined #openal[20:37:04] *** ChanServ sets mode: +v lritter[20:39:57] *** prophile has quit IRC[23:28:23] *** joelt has quit IRC