Cinnamon audio library
Revision | e05ce63142c2ce4a42724de01db22113b5ac94fa (tree) |
---|---|
Zeit | 2019-09-10 16:17:10 |
Autor | AlaskanEmily <emily@alas...> |
Commiter | AlaskanEmily |
Fix OpenAL when linking using CC instead of CXX
@@ -7,6 +7,8 @@ | ||
7 | 7 | |
8 | 8 | #include "cinnamon.h" |
9 | 9 | #include "cin_openal.h" |
10 | + | |
11 | +#include <stddef.h> | |
10 | 12 | #include <assert.h> |
11 | 13 | |
12 | 14 | /*****************************************************************************/ |
@@ -270,13 +272,14 @@ enum Cin_LoaderError Cin_CreateLoader(struct Cin_Loader *out, | ||
270 | 272 | assert(drv); |
271 | 273 | assert(drv->ctx); |
272 | 274 | assert(drv->dev); |
273 | - | |
275 | +#if 0 | |
274 | 276 | { |
275 | 277 | const enum Cin_LoaderError err = |
276 | 278 | Cin_FormatCompatible(drv, sample_rate, num_channels, format); |
277 | 279 | if(err != Cin_eLoaderSuccess) |
278 | 280 | return err; |
279 | 281 | } |
282 | +#endif | |
280 | 283 | |
281 | 284 | alcMakeContextCurrent(drv->ctx); |
282 | 285 |
@@ -346,6 +349,7 @@ unsigned Cin_StructSoundSize(){ | ||
346 | 349 | |
347 | 350 | enum Cin_SoundError Cin_SoundPlay(struct Cin_Sound *snd){ |
348 | 351 | alcMakeContextCurrent(snd->ctx); |
352 | + alSourcei(snd->snd, AL_LOOPING, AL_FALSE); | |
349 | 353 | alSourcePlay(snd->snd); |
350 | 354 | return Cin_eSoundSuccess; |
351 | 355 | } |