Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
9a692b7b
Commit
9a692b7b
authored
19 years ago
by
jpbl
Browse files
Options
Downloads
Patches
Plain Diff
cleaned the example03.cpp
parent
bd722d03
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/audio/OpenAL/NullSource.cpp
+37
-0
37 additions, 0 deletions
src/audio/OpenAL/NullSource.cpp
src/audio/OpenAL/example03.cpp
+10
-8
10 additions, 8 deletions
src/audio/OpenAL/example03.cpp
with
47 additions
and
8 deletions
src/audio/OpenAL/NullSource.cpp
0 → 100644
+
37
−
0
View file @
9a692b7b
/*
* Copyright (C) 2004-2005 Savoir-Faire Linux inc.
* Author: Jean-Philippe Barrette-LaPierre
* <jean-philippe.barrette-lapierre@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include
"NullSource.hpp"
SFLAudio
::
NullSource
::
NullSource
()
:
Source
(
0
,
0
)
{}
bool
SFLAudio
::
NullSource
::
isPlaying
()
{
return
true
;}
void
SFLAudio
::
NullSource
::
play
(
void
*
,
int
)
{}
void
SFLAudio
::
NullSource
::
stop
()
{}
This diff is collapsed.
Click to expand it.
src/audio/OpenAL/example03.cpp
+
10
−
8
View file @
9a692b7b
...
...
@@ -51,8 +51,8 @@ int main(int argc, char* argv[])
Info
*
infos
=
new
Info
[
argc
-
1
];
ALenum
error
;
// Load wav files
for
(
int
i
=
0
;
i
<
2
;
i
++
)
{
// Load test.wav
alutLoadWAVFile
(
files
[
i
],
&
infos
[
i
].
format
,
&
infos
[
i
].
data
,
...
...
@@ -68,24 +68,26 @@ int main(int argc, char* argv[])
i
++
;
}
// Start the wav playing.
for
(
int
i
=
0
;
i
<
argc
-
1
;
i
++
)
{
Source
*
source
=
context
->
createSource
(
infos
[
i
].
format
,
infos
[
i
].
freq
);
source
->
play
(
&
infos
[
i
].
data
,
infos
[
i
].
size
);
}
// Unload wav files
for
(
int
i
=
0
;
i
<
argc
-
1
;
i
++
)
{
// Unload wav files
alutUnloadWAV
(
infos
[
i
].
format
,
infos
[
i
].
data
,
infos
[
i
].
size
,
infos
[
i
].
freq
);
error
=
alGetError
();
if
(
error
!=
AL_NO_ERROR
)
{
std
::
cerr
<<
"OpenAL: unloadWAV : "
<<
alGetString
(
error
);
}
}
std
::
cin
.
get
();
error
=
alGetError
();
if
(
error
!=
AL_NO_ERROR
)
{
std
::
cerr
<<
"OpenAL: unloadWAV : "
<<
alGetString
(
error
);
}
// Wait for user input.
std
::
cout
<<
"Press any key to quit the program."
<<
std
::
endl
;
std
::
cin
.
get
();
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment