Browse Source

Audio: removed deprecated list-argument functions taking pointers.

Use function taking references instead.
pull/107/head
Vladimír Vondruš 11 years ago
parent
commit
84f30d0dcc
  1. 39
      src/Magnum/Audio/Source.cpp
  2. 36
      src/Magnum/Audio/Source.h

39
src/Magnum/Audio/Source.cpp

@ -54,17 +54,6 @@ Containers::Array<ALuint> sourceIds(const std::vector<std::reference_wrapper<Sou
return ids;
}
#ifdef MAGNUM_BUILD_DEPRECATED
Containers::Array<ALuint> sourceIds(const std::vector<Source*>& sources) {
Containers::Array<ALuint> ids(sources.size());
for(auto it = sources.begin(); it != sources.end(); ++it) {
CORRADE_INTERNAL_ASSERT(*it);
ids[it-sources.begin()] = (*it)->id();
}
return ids;
}
#endif
}
void Source::play(std::initializer_list<std::reference_wrapper<Source>> sources) {
@ -77,13 +66,6 @@ void Source::play(const std::vector<std::reference_wrapper<Source>>& sources) {
alSourcePlayv(ids.size(), ids);
}
#ifdef MAGNUM_BUILD_DEPRECATED
void Source::play(const std::vector<Source*>& sources) {
const auto ids = sourceIds(sources);
alSourcePlayv(ids.size(), ids);
}
#endif
void Source::pause(std::initializer_list<std::reference_wrapper<Source>> sources) {
const auto ids = sourceIds(sources);
alSourcePausev(ids.size(), ids);
@ -94,13 +76,6 @@ void Source::pause(const std::vector<std::reference_wrapper<Source>>& sources) {
alSourcePausev(ids.size(), ids);
}
#ifdef MAGNUM_BUILD_DEPRECATED
void Source::pause(const std::vector<Source*>& sources) {
const auto ids = sourceIds(sources);
alSourcePausev(ids.size(), ids);
}
#endif
void Source::stop(std::initializer_list<std::reference_wrapper<Source>> sources) {
const auto ids = sourceIds(sources);
alSourceStopv(ids.size(), ids);
@ -111,13 +86,6 @@ void Source::stop(const std::vector<std::reference_wrapper<Source>>& sources) {
alSourceStopv(ids.size(), ids);
}
#ifdef MAGNUM_BUILD_DEPRECATED
void Source::stop(const std::vector<Source*>& sources) {
const auto ids = sourceIds(sources);
alSourceStopv(ids.size(), ids);
}
#endif
void Source::rewind(std::initializer_list<std::reference_wrapper<Source>> sources) {
const auto ids = sourceIds(sources);
alSourceRewindv(ids.size(), ids);
@ -128,13 +96,6 @@ void Source::rewind(const std::vector<std::reference_wrapper<Source>>& sources)
alSourceRewindv(ids.size(), ids);
}
#ifdef MAGNUM_BUILD_DEPRECATED
void Source::rewind(const std::vector<Source*>& sources) {
const auto ids = sourceIds(sources);
alSourceRewindv(ids.size(), ids);
}
#endif
Debug operator<<(Debug debug, const Source::State value) {
switch(value) {
#define _c(value) case Source::State::value: return debug << "Audio::Source::State::" #value;

36
src/Magnum/Audio/Source.h

@ -386,15 +386,6 @@ class MAGNUM_AUDIO_EXPORT Source {
static void play(std::initializer_list<std::reference_wrapper<Source>> sources);
static void play(const std::vector<std::reference_wrapper<Source>>& sources); /**< @overload */
#ifdef MAGNUM_BUILD_DEPRECATED
/**
* @copybrief play(const std::vector<std::reference_wrapper<Source>>&)
* @deprecated Use @ref play(const std::vector<std::reference_wrapper<Source>>&)
* instead.
*/
static CORRADE_DEPRECATED("use play(const std::vector<std::reference_wrapper<Source>>&) instead") void play(const std::vector<Source*>& sources);
#endif
/**
* @brief Pause more sources at once
*
@ -408,15 +399,6 @@ class MAGNUM_AUDIO_EXPORT Source {
static void pause(std::initializer_list<std::reference_wrapper<Source>> sources);
static void pause(const std::vector<std::reference_wrapper<Source>>& sources); /**< @overload */
#ifdef MAGNUM_BUILD_DEPRECATED
/**
* @copybrief pause(const std::vector<std::reference_wrapper<Source>>&)
* @deprecated Use @ref pause(const std::vector<std::reference_wrapper<Source>>&)
* instead.
*/
static CORRADE_DEPRECATED("use pause(const std::vector<std::reference_wrapper<Source>>&) instead") void pause(const std::vector<Source*>& sources);
#endif
/**
* @brief Stop more sources at once
*
@ -430,15 +412,6 @@ class MAGNUM_AUDIO_EXPORT Source {
static void stop(std::initializer_list<std::reference_wrapper<Source>> sources);
static void stop(const std::vector<std::reference_wrapper<Source>>& sources); /**< @overload */
#ifdef MAGNUM_BUILD_DEPRECATED
/**
* @copybrief stop(const std::vector<std::reference_wrapper<Source>>&)
* @deprecated Use @ref stop(const std::vector<std::reference_wrapper<Source>>&)
* instead.
*/
static CORRADE_DEPRECATED("use stop(const std::vector<std::reference_wrapper<Source>>&) instead") void stop(const std::vector<Source*>& sources);
#endif
/**
* @brief Rewind more sources at once
*
@ -452,15 +425,6 @@ class MAGNUM_AUDIO_EXPORT Source {
static void rewind(std::initializer_list<std::reference_wrapper<Source>> sources);
static void rewind(const std::vector<std::reference_wrapper<Source>>& sources); /**< @overload */
#ifdef MAGNUM_BUILD_DEPRECATED
/**
* @copybrief rewind(const std::vector<std::reference_wrapper<Source>>&)
* @deprecated Use @ref rewind(const std::vector<std::reference_wrapper<Source>>&)
* instead.
*/
static CORRADE_DEPRECATED("use rewind(const std::vector<std::reference_wrapper<Source>>&) instead") void rewind(const std::vector<Source*>& sources);
#endif
/**
* @brief State
*

Loading…
Cancel
Save