forked from wang-bin/QtAV
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
66 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/****************************************************************************** | ||
QtAV: Media play library based on Qt and FFmpeg | ||
Copyright (C) 2014 Wang Bin <[email protected]> | ||
* This file is part of QtAV | ||
This library is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU Lesser General Public | ||
License as published by the Free Software Foundation; either | ||
version 2.1 of the License, or (at your option) any later version. | ||
This library 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 | ||
Lesser General Public License for more details. | ||
You should have received a copy of the GNU Lesser General Public | ||
License along with this library; if not, write to the Free Software | ||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
******************************************************************************/ | ||
|
||
#if defined(HEADER_OPENAL_PREFIX) | ||
#include <OpenAL/al.h> | ||
#include <OpenAL/alc.h> | ||
#else | ||
#include <AL/al.h> | ||
#include <AL/alc.h> | ||
#endif | ||
|
||
int main() | ||
{ | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
CONFIG -= qt | ||
CONFIG += console | ||
|
||
SOURCES += main.cpp | ||
|
||
win32: LIBS += -lOpenAL32 | ||
unix:!mac:!blackberry: LIBS += -lopenal | ||
blackberry: LIBS += -lOpenAL | ||
mac: LIBS += -framework OpenAL | ||
mac: DEFINES += HEADER_OPENAL_PREFIX | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/****************************************************************************** | ||
AOOpenAL.cpp: description | ||
Copyright (C) 2012 Wang Bin <[email protected]> | ||
Copyright (C) 2012-2014 Wang Bin <[email protected]> | ||
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 | ||
|
@@ -21,10 +21,14 @@ | |
#include "private/AudioOutput_p.h" | ||
#include <QtCore/QVector> | ||
#include <QtCore/QElapsedTimer> | ||
#include <string> | ||
|
||
#if defined(HEADER_OPENAL_PREFIX) | ||
#include <OpenAL/al.h> | ||
#include <OpenAL/alc.h> | ||
#else | ||
#include <AL/al.h> | ||
#include <AL/alc.h> | ||
#include <AL/alext.h> | ||
#endif | ||
|
||
namespace QtAV { | ||
|
||
|
@@ -144,7 +148,7 @@ bool AOOpenAL::open() | |
{ | ||
DPTR_D(AOOpenAL); | ||
d.available = false; // TODO: d.reset() | ||
QVector<std::string> _devices; | ||
QVector<QByteArray> _devices; | ||
const char *p = NULL; | ||
if (alcIsExtensionPresent(NULL, "ALC_ENUMERATE_ALL_EXT")) | ||
p = alcGetString(NULL, ALC_ALL_DEVICES_SPECIFIER); | ||
|
@@ -156,7 +160,7 @@ bool AOOpenAL::open() | |
} | ||
qDebug("OpenAL devices available: %d", _devices.size()); | ||
for (int i = 0; i < _devices.size(); i++) { | ||
qDebug("device %d: %s", i, _devices[i].c_str()); | ||
qDebug("device %d: %s", i, _devices[i].constData()); | ||
} | ||
const ALCchar *default_device = alcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER); | ||
qDebug("AOOpenAL Opening default device: %s", default_device); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters