Skip to content

Commit

Permalink
M_ -> CFG_
Browse files Browse the repository at this point in the history
  • Loading branch information
igagis committed May 6, 2024
1 parent 52a8a99 commit b3d392e
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 36 deletions.
21 changes: 1 addition & 20 deletions doc/doxygen.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -1648,16 +1648,6 @@ LATEX_BATCHMODE = NO

LATEX_HIDE_INDICES = NO

# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
# code with syntax highlighting in the LaTeX output.
#
# Note that which sources are shown also depends on other settings such as
# SOURCE_BROWSER.
# The default value is: NO.
# This tag requires that the tag GENERATE_LATEX is set to YES.

LATEX_SOURCE_CODE = NO

# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
# bibliography, e.g. plainnat, or ieeetr. See
# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
Expand Down Expand Up @@ -1911,7 +1901,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.

PREDEFINED = M_DOXYGEN_DONT_EXTRACT
PREDEFINED = CFG_DOXYGEN_DONT_EXTRACT

# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
Expand Down Expand Up @@ -1981,15 +1971,6 @@ EXTERNAL_PAGES = YES
# Configuration options related to the dot tool
#---------------------------------------------------------------------------

# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram
# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
# NO turns the diagrams off. Note that this option also works with HAVE_DOT
# disabled, but it is recommended to install and use dot, since it yields more
# powerful graphs.
# The default value is: YES.

CLASS_DIAGRAMS = YES

# You can include diagrams made with dia in doxygen documentation. Doxygen will
# then run dia to produce the diagram and insert it in the documentation. The
# DIA_PATH tag allows you to specify the directory where the dia binary resides.
Expand Down
2 changes: 1 addition & 1 deletion src/audout/backend/apple_coreaudio.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class audio_backend : public utki::destructable{
//open the default audio device
AudioComponentDescription desc;
desc.componentType = kAudioUnitType_Output;
#if M_OS_NAME == M_OS_NAME_IOS
#if CFG_OS_NAME == CFG_OS_NAME_IOS
desc.componentSubType = kAudioUnitSubType_GenericOutput;
#else
desc.componentSubType = kAudioUnitSubType_DefaultOutput;
Expand Down
2 changes: 1 addition & 1 deletion src/audout/backend/direct_sound.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ SOFTWARE.

#include <nitki/queue.hpp>

#if M_OS != M_OS_WINDOWS
#if CFG_OS != CFG_OS_WINDOWS
# error "compiling in non-Windows environment"
#endif

Expand Down
15 changes: 8 additions & 7 deletions src/audout/backend/opensl_es.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ SOFTWARE.
#include <vector>
#include <array>

#include <utki/config.hpp>
#include <utki/util.hpp>
#include <utki/destructable.hpp>

#include <SLES/OpenSLES.h>

#if M_OS_NAME == M_OS_NAME_ANDROID
#if CFG_OS_NAME == CFG_OS_NAME_ANDROID
# include <SLES/OpenSLES_Android.h>
#include <cstdint>

Expand Down Expand Up @@ -126,7 +127,7 @@ class audio_backend : public utki::destructable{

SLObjectItf object;
SLPlayItf play;
#if M_OS_NAME == M_OS_NAME_ANDROID
#if CFG_OS_NAME == CFG_OS_NAME_ANDROID
SLAndroidSimpleBufferQueueItf
#else
SLBufferQueueItf
Expand All @@ -137,7 +138,7 @@ class audio_backend : public utki::destructable{

// this callback handler is called every time a buffer finishes playing
static void Callback(
#if M_OS_NAME == M_OS_NAME_ANDROID
#if CFG_OS_NAME == CFG_OS_NAME_ANDROID
SLAndroidSimpleBufferQueueItf queue,
void *context
#else
Expand All @@ -155,7 +156,7 @@ class audio_backend : public utki::destructable{
ASSERT(context)
Player* player = static_cast<Player*>(context);

#if M_OS_NAME == M_OS_NAME_ANDROID
#if CFG_OS_NAME == CFG_OS_NAME_ANDROID
#else
ASSERT(buffer == &*player->bufs[0].begin())
ASSERT(bufferSize == player->bufs[0].size())
Expand All @@ -165,7 +166,7 @@ class audio_backend : public utki::destructable{
ASSERT(player->bufs.size() == 2)
std::swap(player->bufs[0], player->bufs[1]); // swap buffers, the 0th one is the buffer which is currently playing

#if M_OS_NAME == M_OS_NAME_ANDROID
#if CFG_OS_NAME == CFG_OS_NAME_ANDROID
SLresult res = (*queue)->Enqueue(queue, &*player->bufs[0].begin(), player->bufs[0].size());
#else
SLresult res = (*queue)->Enqueue(queue, &*player->bufs[0].begin(), player->bufs[0].size(), SL_BOOLEAN_FALSE);
Expand Down Expand Up @@ -198,7 +199,7 @@ class audio_backend : public utki::destructable{

//========================
// configure audio source
#if M_OS_NAME == M_OS_NAME_ANDROID
#if CFG_OS_NAME == CFG_OS_NAME_ANDROID
SLDataLocator_AndroidSimpleBufferQueue bufferQueueStruct = {SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE, 2}; //2 buffers in queue
#else
SLDataLocator_BufferQueue bufferQueueStruct = {SL_DATALOCATOR_BUFFERQUEUE, 2}; // 2 buffers in queue
Expand Down Expand Up @@ -329,7 +330,7 @@ class audio_backend : public utki::destructable{
this->setPaused(false);

// enqueue the first buffer for playing, otherwise it will not start playing
#if M_OS_NAME == M_OS_NAME_ANDROID
#if CFG_OS_NAME == CFG_OS_NAME_ANDROID
SLresult res = (*this->player.bufferQueue)->Enqueue(
this->player.bufferQueue,
&*this->player.bufs[0].begin(),
Expand Down
10 changes: 6 additions & 4 deletions src/audout/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,18 @@ SOFTWARE.

#include "player.hpp"

#if M_OS == M_OS_WINDOWS
#include <utki/config.hpp>

#if CFG_OS == CFG_OS_WINDOWS
# include "backend/direct_sound.cxx"
#elif M_OS == M_OS_LINUX
# if M_OS_NAME == M_OS_NAME_ANDROID
#elif CFG_OS == CFG_OS_LINUX
# if CFG_OS_NAME == CFG_OS_NAME_ANDROID
# include "backend/opensl_es.cxx"
# else
# include "backend/pulse_audio.cxx"
// # include "backend/alsa.cxx"
# endif
#elif M_OS == M_OS_MACOSX
#elif CFG_OS == CFG_OS_MACOSX
# include "backend/apple_coreaudio.cxx"
#else
# error "Unknown OS"
Expand Down
1 change: 0 additions & 1 deletion src/audout/player.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ SOFTWARE.

#pragma once

#include <utki/config.hpp>
#include <utki/singleton.hpp>
#include <utki/destructable.hpp>
#include <utki/span.hpp>
Expand Down
4 changes: 2 additions & 2 deletions tests/sinesynth/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "../../src/audout/player.hpp"

#if M_OS_NAME == M_OS_NAME_ANDROID
#if CFG_OS_NAME == CFG_OS_NAME_ANDROID
# include <jni.h>
#endif

Expand Down Expand Up @@ -90,7 +90,7 @@ void test(){
}
}

#if M_OS_NAME == M_OS_NAME_ANDROID
#if CFG_OS_NAME == CFG_OS_NAME_ANDROID

JNIEXPORT void JNICALL Java_cppfw_github_io_audouttests_MainActivity_test(
JNIEnv *env,
Expand Down

0 comments on commit b3d392e

Please sign in to comment.