1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
#! /bin/sh /usr/share/dpatch/dpatch-run
## 30_new_openAL.dpatch by Mike Furr <mfurr@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
@DPATCH@
Index: chromium-0.9.12/src/AudioOpenAL.cpp
===================================================================
--- chromium-0.9.12.orig/src/AudioOpenAL.cpp 2007-04-06 22:26:45.000000000 +0200
+++ chromium-0.9.12/src/AudioOpenAL.cpp 2007-04-06 22:26:45.000000000 +0200
@@ -52,8 +52,8 @@
//try to use OpenAL alc[GS]etAudioChannel extensions in linux...
#ifdef __linux__
#define CD_VOLUME 1
-// #include <AL/alext.h>
- #include <AL/alexttypes.h>
+ #include <AL/alext.h>
+// #include <AL/alexttypes.h>
#endif //__linux__
#endif //USE_SDL
#endif
@@ -472,6 +472,7 @@
ALsizei size, freq;
ALenum format;
ALvoid *data;
+ ALboolean loop;
for(i = 0; i < NumSoundTypes; i++)
{
@@ -482,9 +483,9 @@
else
{
#ifndef _WIN32
- alutLoadWAV(dataLoc(fileNames[i]), &data, &format, &size, &bits, &freq);
+ alutLoadWAVFile(const_cast<ALbyte*>(dataLoc(fileNames[i])), &format, &data, &size, &freq, &loop);
alBufferData (buffer[i], format, data, size, freq);
- free(data);
+ alutUnloadWAV(format,data,size,freq);
#else //_WIN32
char nameBuffer[256];
sprintf(nameBuffer, "%s", dataLoc(fileNames[i]));
@@ -844,14 +845,16 @@
return false;
#else //USE_PLAYLIST
bool retVal;
- ALsizei size, freq, bits;
+ ALsizei size, freq;
ALenum format;
ALvoid *data;
- retVal = alutLoadWAV(filename, &data, &format, &size, &bits, &freq);
+ ALboolean loop;
+ alutLoadWAVFile(const_cast<ALbyte*>(filename), &format, &data, &size, &freq, &loop);
+ retVal = (alGetError() == AL_NO_ERROR);
if(retVal)
{
alBufferData (buffer[MusicGame], format, data, size, freq);
- free(data);
+ alutUnloadWAV(format,data,size,freq);
}
return retVal;
#endif//USE_PLAYLIST
Index: chromium-0.9.12/src/AudioOpenAL.h
===================================================================
--- chromium-0.9.12.orig/src/AudioOpenAL.h 2001-03-20 16:11:07.000000000 +0100
+++ chromium-0.9.12/src/AudioOpenAL.h 2007-04-06 22:26:45.000000000 +0200
@@ -16,6 +16,7 @@
#include <openal.h>
#else //macintosh
#include <AL/al.h>
+#include <AL/alut.h>
#endif //macintosh
/**
@@ -89,7 +90,7 @@
float origCDvolume;
- void *context_id;
+ ALCcontext *context_id;
bool initialized;
float audioScale[3];
|