Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
c3a13b4a39 | |||
7ab2025721 | |||
34eb6d5cf0 | |||
429a1cd062 | |||
6e534cbf22 | |||
c7d5c42ea8 | |||
918d573f18 | |||
fe23d699d1 | |||
e0a01e4280 | |||
fd1651924a | |||
ecb2b4d99e | |||
276e4ce356 | |||
943323947d |
88
.travis.yml
88
.travis.yml
@@ -1,11 +1,7 @@
|
|||||||
language:
|
language: cpp
|
||||||
- cpp
|
|
||||||
|
|
||||||
sudo: false
|
sudo: required
|
||||||
|
dist: trusty
|
||||||
os:
|
|
||||||
- linux
|
|
||||||
- osx
|
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
@@ -18,33 +14,81 @@ addons:
|
|||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
packages:
|
packages:
|
||||||
- g++-4.9
|
- g++-4.9
|
||||||
|
- expect
|
||||||
|
- binutils-mingw-w64-x86-64 # 64bit MinGW
|
||||||
|
- gcc-mingw-w64-x86-64
|
||||||
|
- g++-mingw-w64-x86-64
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: linux
|
||||||
|
env: CONF=release BUILDER=gcc TARGET=Linux TAG=Linux COMPILATOR_OPTION="--compilator-version=4.9" GCOV=--gcov
|
||||||
|
compiler: gcc
|
||||||
|
- os: linux
|
||||||
|
env: CONF=debug BUILDER=clang TARGET=Linux
|
||||||
|
compiler: clang
|
||||||
|
- os: linux
|
||||||
|
env: CONF=release BUILDER=gcc TARGET=Windows TAG=Mingw
|
||||||
|
compiler: x86_64-w64-mingw32-gcc
|
||||||
|
- os: linux
|
||||||
|
env: CONF=release BUILDER=gcc TARGET=Android TAG=Android DISABLE_PACKAGE=-p
|
||||||
|
compiler: gcc
|
||||||
|
- os: osx
|
||||||
|
env: CONF=release BUILDER=clang TARGET=MacOs TAG=MacOs
|
||||||
|
compiler: clang
|
||||||
|
- os: osx
|
||||||
|
env: CONF=release BUILDER=clang TARGET=IOs TAG=IOs
|
||||||
|
compiler: clang
|
||||||
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
- cd ..
|
||||||
- pip install --user lutin
|
- pip install --user lutin
|
||||||
|
- if [ "$TAG" == "Android" ]; then
|
||||||
env:
|
git clone --depth 1 --branch master https://github.com/HeeroYui/android-download-tool;
|
||||||
- CONF=debug BOARD=Linux BUILDER=clang GCOV=
|
./android-download-tool/dl-android.sh;
|
||||||
- CONF=release BOARD=Linux BUILDER=clang GCOV=
|
fi
|
||||||
- CONF=debug BOARD=Linux BUILDER=gcc GCOV=
|
- git clone --depth 1 --branch master https://github.com/atria-soft/ci.git
|
||||||
- CONF=release BOARD=Linux BUILDER=gcc GCOV=
|
- cd -
|
||||||
- CONF=debug BOARD=Linux BUILDER=gcc GCOV=--gcov
|
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- cd ..
|
- cd ..
|
||||||
- wget http://atria-soft.com/ci/coverage_send.py
|
- git clone https://github.com/atria-soft/etk.git -b $TRAVIS_BRANCH
|
||||||
- wget http://atria-soft.com/ci/test_send.py
|
- git clone https://github.com/atria-soft/elog.git -b $TRAVIS_BRANCH
|
||||||
- wget http://atria-soft.com/ci/warning_send.py
|
- git clone https://github.com/atria-soft/ememory.git -b $TRAVIS_BRANCH
|
||||||
- git clone https://github.com/atria-soft/etk.git
|
- git clone https://github.com/atria-soft/echrono.git -b $TRAVIS_BRANCH
|
||||||
- git clone https://github.com/musicdsp/audio.git
|
- git clone https://github.com/atria-soft/ethread.git -b $TRAVIS_BRANCH
|
||||||
|
- git clone https://github.com/atria-soft/ejson.git -b $TRAVIS_BRANCH
|
||||||
|
- git clone https://github.com/atria-soft/jvm-basics.git -b $TRAVIS_BRANCH
|
||||||
|
- git clone https://github.com/musicdsp/audio.git -b $TRAVIS_BRANCH
|
||||||
|
- git clone https://github.com/generic-library/gtest-lutin.git --recursive
|
||||||
|
- git clone https://github.com/generic-library/z-lutin.git --recursive
|
||||||
- pwd
|
- pwd
|
||||||
- ls -l
|
- ls -l
|
||||||
- if [ "$BUILDER" == "gcc" ]; then COMPILATOR_OPTION="--compilator-version=4.9"; else COMPILATOR_OPTION=""; fi
|
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
||||||
|
export PATH=$PATH:/Users/travis/Library/Python/2.7/bin/;
|
||||||
|
fi
|
||||||
|
- ./ci/build_send.py --tag=$TAG --status=START;
|
||||||
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- lutin -w -j4 -C -P -c $BUILDER $COMPILATOR_OPTION -m $CONF $GCOV -p audio-orchestra
|
- lutin -w -j4 -C -P -t$TARGET -c $BUILDER $COMPILATOR_OPTION $BUS -m $CONF $GCOV $DISABLE_PACKAGE audio-orchestra; STATUS=$?
|
||||||
# - ./out/Linux_x86_64/$CONF/staging/$BUILDER/audio-orchestra/usr/bin/audio-orchestra -l6
|
- ./ci/build_send.py --tag=$TAG --status="$STATUS";
|
||||||
|
|
||||||
|
after_script:
|
||||||
|
- if [ "$GCOV" != "" ]; then
|
||||||
|
./ci/warning_send.py --find-path ./out/Linux_x86_64/$CONF/build/$BUILDER/audio-orchestra/;
|
||||||
|
fi
|
||||||
|
#- lutin -w -j4 -C -P -t$TARGET -c $BUILDER $COMPILATOR_OPTION $BUS -m $CONF $GCOV $DISABLE_PACKAGE audio-orchestra-test?run:--elog-level=3 | tee out_test.txt
|
||||||
|
#- if [ "$GCOV" != "" ]; then
|
||||||
|
# ./ci/test_send.py --file=out_test.txt;
|
||||||
|
# lutin -C -P -t $TARGET -c $BUILDER $COMPILATOR_OPTION $BUS -m $CONF -p audio-orchestra?gcov;
|
||||||
|
# ./ci/coverage_send.py --json=out/Linux_x86_64/$CONF/build/$BUILDER/audio-orchestra/audio-orchestra_coverage.json;
|
||||||
|
# fi
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email:
|
email:
|
||||||
- yui.heero@gmail.com
|
- yui.heero@gmail.com
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -5,9 +5,9 @@
|
|||||||
* @fork from RTAudio
|
* @fork from RTAudio
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#include <etk/types.h>
|
//#include <etk/types.hpp>
|
||||||
#include <audio/orchestra/Interface.h>
|
#include <audio/orchestra/Interface.hpp>
|
||||||
#include <audio/orchestra/debug.h>
|
#include <audio/orchestra/debug.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
@@ -7,15 +7,20 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <audio/orchestra/debug.h>
|
#include <audio/orchestra/debug.hpp>
|
||||||
#include <audio/orchestra/type.h>
|
#include <audio/orchestra/type.hpp>
|
||||||
#include <audio/orchestra/state.h>
|
#include <audio/orchestra/state.hpp>
|
||||||
#include <audio/orchestra/mode.h>
|
#include <audio/orchestra/mode.hpp>
|
||||||
#include <audio/Time.h>
|
#include <audio/Time.hpp>
|
||||||
#include <audio/Duration.h>
|
#include <audio/Duration.hpp>
|
||||||
#include <ememory/memory.h>
|
#include <ememory/memory.hpp>
|
||||||
|
/**
|
||||||
|
* @brief Audio library namespace
|
||||||
|
*/
|
||||||
namespace audio {
|
namespace audio {
|
||||||
|
/**
|
||||||
|
* @brief Audio-orchestra library namespace
|
||||||
|
*/
|
||||||
namespace orchestra {
|
namespace orchestra {
|
||||||
const std::vector<uint32_t>& genericSampleRate();
|
const std::vector<uint32_t>& genericSampleRate();
|
||||||
/**
|
/**
|
@@ -5,10 +5,10 @@
|
|||||||
* @fork from RTAudio
|
* @fork from RTAudio
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#include <etk/types.h>
|
//#include <etk/types.hpp>
|
||||||
#include <audio/orchestra/debug.h>
|
#include <audio/orchestra/debug.hpp>
|
||||||
#include <audio/orchestra/DeviceInfo.h>
|
#include <audio/orchestra/DeviceInfo.hpp>
|
||||||
#include <etk/stdTools.h>
|
#include <etk/stdTools.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
void audio::orchestra::DeviceInfo::display(int32_t _tabNumber) const {
|
void audio::orchestra::DeviceInfo::display(int32_t _tabNumber) const {
|
||||||
|
@@ -6,8 +6,8 @@
|
|||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <audio/format.h>
|
#include <audio/format.hpp>
|
||||||
#include <audio/channel.h>
|
#include <audio/channel.hpp>
|
||||||
|
|
||||||
namespace audio {
|
namespace audio {
|
||||||
namespace orchestra {
|
namespace orchestra {
|
@@ -5,5 +5,5 @@
|
|||||||
* @fork from RTAudio
|
* @fork from RTAudio
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <audio/orchestra/Flags.h>
|
#include <audio/orchestra/Flags.hpp>
|
||||||
#include <audio/orchestra/debug.h>
|
#include <audio/orchestra/debug.hpp>
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <etk/types.h>
|
#include <etk/types.hpp>
|
||||||
|
|
||||||
namespace audio {
|
namespace audio {
|
||||||
namespace orchestra {
|
namespace orchestra {
|
@@ -5,19 +5,19 @@
|
|||||||
* @fork from RTAudio
|
* @fork from RTAudio
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#include <etk/types.h>
|
//#include <etk/types.hpp>
|
||||||
#include <audio/orchestra/Interface.h>
|
#include <audio/orchestra/Interface.hpp>
|
||||||
#include <audio/orchestra/debug.h>
|
#include <audio/orchestra/debug.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <audio/orchestra/api/Alsa.h>
|
#include <audio/orchestra/api/Alsa.hpp>
|
||||||
#include <audio/orchestra/api/Android.h>
|
#include <audio/orchestra/api/Android.hpp>
|
||||||
#include <audio/orchestra/api/Asio.h>
|
#include <audio/orchestra/api/Asio.hpp>
|
||||||
#include <audio/orchestra/api/Core.h>
|
#include <audio/orchestra/api/Core.hpp>
|
||||||
#include <audio/orchestra/api/CoreIos.h>
|
#include <audio/orchestra/api/CoreIos.hpp>
|
||||||
#include <audio/orchestra/api/Ds.h>
|
#include <audio/orchestra/api/Ds.hpp>
|
||||||
#include <audio/orchestra/api/Dummy.h>
|
#include <audio/orchestra/api/Dummy.hpp>
|
||||||
#include <audio/orchestra/api/Jack.h>
|
#include <audio/orchestra/api/Jack.hpp>
|
||||||
#include <audio/orchestra/api/Pulse.h>
|
#include <audio/orchestra/api/Pulse.hpp>
|
||||||
|
|
||||||
std::vector<std::string> audio::orchestra::Interface::getListApi() {
|
std::vector<std::string> audio::orchestra::Interface::getListApi() {
|
||||||
std::vector<std::string> apis;
|
std::vector<std::string> apis;
|
||||||
|
@@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <audio/orchestra/base.h>
|
#include <audio/orchestra/base.hpp>
|
||||||
#include <audio/orchestra/CallbackInfo.h>
|
#include <audio/orchestra/CallbackInfo.hpp>
|
||||||
#include <audio/orchestra/Api.h>
|
#include <audio/orchestra/Api.hpp>
|
||||||
|
|
||||||
namespace audio {
|
namespace audio {
|
||||||
namespace orchestra {
|
namespace orchestra {
|
@@ -5,9 +5,9 @@
|
|||||||
* @fork from RTAudio
|
* @fork from RTAudio
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <audio/orchestra/StreamOptions.h>
|
#include <audio/orchestra/StreamOptions.hpp>
|
||||||
#include <etk/stdTools.h>
|
#include <etk/stdTools.hpp>
|
||||||
#include <audio/orchestra/debug.h>
|
#include <audio/orchestra/debug.hpp>
|
||||||
|
|
||||||
static const char* listValue[] = {
|
static const char* listValue[] = {
|
||||||
"hardware",
|
"hardware",
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <audio/orchestra/Flags.h>
|
#include <audio/orchestra/Flags.hpp>
|
||||||
|
|
||||||
namespace audio {
|
namespace audio {
|
||||||
namespace orchestra {
|
namespace orchestra {
|
@@ -9,24 +9,24 @@
|
|||||||
#if defined(ORCHESTRA_BUILD_ALSA)
|
#if defined(ORCHESTRA_BUILD_ALSA)
|
||||||
|
|
||||||
#include <alsa/asoundlib.h>
|
#include <alsa/asoundlib.h>
|
||||||
#include <unistd.h>
|
|
||||||
#include <audio/orchestra/Interface.h>
|
#include <audio/orchestra/Interface.hpp>
|
||||||
#include <audio/orchestra/debug.h>
|
#include <audio/orchestra/debug.hpp>
|
||||||
#include <etk/stdTools.h>
|
#include <etk/stdTools.hpp>
|
||||||
#include <ethread/tools.h>
|
#include <ethread/tools.hpp>
|
||||||
#include <limits.h>
|
#include <climits>
|
||||||
#include <audio/orchestra/api/Alsa.h>
|
#include <audio/orchestra/api/Alsa.hpp>
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <sched.h>
|
#include <sched.h>
|
||||||
#include <errno.h>
|
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <math.h>
|
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
}
|
}
|
||||||
|
#include <cerrno>
|
||||||
|
#include <cstdio>
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <cstring>
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
ememory::SharedPtr<audio::orchestra::Api> audio::orchestra::api::Alsa::create() {
|
ememory::SharedPtr<audio::orchestra::Api> audio::orchestra::api::Alsa::create() {
|
||||||
return ememory::SharedPtr<audio::orchestra::api::Alsa>(new audio::orchestra::api::Alsa());
|
return ememory::SharedPtr<audio::orchestra::api::Alsa>(new audio::orchestra::api::Alsa());
|
||||||
@@ -1167,7 +1167,7 @@ void audio::orchestra::api::Alsa::callbackEventOneCycleRead() {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ATA_ERROR("audio read error, " << snd_strerror(result) << ".");
|
ATA_ERROR("audio read error, " << snd_strerror(result) << ".");
|
||||||
usleep(10000);
|
std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
||||||
}
|
}
|
||||||
// TODO : Notify application ... audio::orchestra::error_warning;
|
// TODO : Notify application ... audio::orchestra::error_warning;
|
||||||
goto noInput;
|
goto noInput;
|
||||||
@@ -1521,7 +1521,7 @@ void audio::orchestra::api::Alsa::callbackEventOneCycleMMAPRead() {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ATA_ERROR("audio read error, " << snd_strerror(result) << ".");
|
ATA_ERROR("audio read error, " << snd_strerror(result) << ".");
|
||||||
usleep(10000);
|
std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
||||||
}
|
}
|
||||||
// TODO : Notify application ... audio::orchestra::error_warning;
|
// TODO : Notify application ... audio::orchestra::error_warning;
|
||||||
goto noInput;
|
goto noInput;
|
||||||
|
@@ -8,12 +8,12 @@
|
|||||||
#ifdef ORCHESTRA_BUILD_JAVA
|
#ifdef ORCHESTRA_BUILD_JAVA
|
||||||
|
|
||||||
//#include <ewol/context/Context.h>
|
//#include <ewol/context/Context.h>
|
||||||
#include <unistd.h>
|
|
||||||
#include <audio/orchestra/Interface.h>
|
#include <audio/orchestra/Interface.hpp>
|
||||||
#include <audio/orchestra/debug.h>
|
#include <audio/orchestra/debug.hpp>
|
||||||
#include <audio/orchestra/api/AndroidNativeInterface.h>
|
#include <audio/orchestra/api/AndroidNativeInterface.hpp>
|
||||||
#include <audio/orchestra/api/Android.h>
|
#include <audio/orchestra/api/Android.hpp>
|
||||||
#include <limits.h>
|
#include <climits>
|
||||||
|
|
||||||
ememory::SharedPtr<audio::orchestra::Api> audio::orchestra::api::Android::create() {
|
ememory::SharedPtr<audio::orchestra::Api> audio::orchestra::api::Android::create() {
|
||||||
ATA_INFO("Create Android device ... ");
|
ATA_INFO("Create Android device ... ");
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#ifdef ORCHESTRA_BUILD_JAVA
|
#ifdef ORCHESTRA_BUILD_JAVA
|
||||||
|
|
||||||
#include <audio/orchestra/Interface.h>
|
#include <audio/orchestra/Interface.hpp>
|
||||||
|
|
||||||
namespace audio {
|
namespace audio {
|
||||||
namespace orchestra {
|
namespace orchestra {
|
@@ -7,15 +7,15 @@
|
|||||||
#include <jni.h>
|
#include <jni.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <audio/orchestra/debug.h>
|
#include <audio/orchestra/debug.hpp>
|
||||||
#include <audio/orchestra/error.h>
|
#include <audio/orchestra/error.hpp>
|
||||||
#include <audio/orchestra/api/AndroidNativeInterface.h>
|
#include <audio/orchestra/api/AndroidNativeInterface.hpp>
|
||||||
#include <audio/orchestra/api/Android.h>
|
#include <audio/orchestra/api/Android.hpp>
|
||||||
/* include auto generated file */
|
/* include auto generated file */
|
||||||
#include <org_musicdsp_orchestra_OrchestraConstants.h>
|
#include <org_musicdsp_orchestra_OrchestraConstants.h>
|
||||||
#include <jvm-basics/jvm-basics.h>
|
#include <jvm-basics/jvm-basics.hpp>
|
||||||
#include <ememory/memory.h>
|
#include <ememory/memory.hpp>
|
||||||
#include <ejson/ejson.h>
|
#include <ejson/ejson.hpp>
|
||||||
|
|
||||||
class AndroidOrchestraContext {
|
class AndroidOrchestraContext {
|
||||||
public:
|
public:
|
||||||
|
@@ -7,12 +7,12 @@
|
|||||||
|
|
||||||
#ifdef ORCHESTRA_BUILD_JAVA
|
#ifdef ORCHESTRA_BUILD_JAVA
|
||||||
|
|
||||||
#include <audio/orchestra/DeviceInfo.h>
|
#include <audio/orchestra/DeviceInfo.hpp>
|
||||||
#include <audio/orchestra/mode.h>
|
#include <audio/orchestra/mode.hpp>
|
||||||
#include <audio/orchestra/error.h>
|
#include <audio/orchestra/error.hpp>
|
||||||
#include <audio/orchestra/StreamOptions.h>
|
#include <audio/orchestra/StreamOptions.hpp>
|
||||||
#include <audio/format.h>
|
#include <audio/format.hpp>
|
||||||
#include <ememory/memory.h>
|
#include <ememory/memory.hpp>
|
||||||
|
|
||||||
namespace audio {
|
namespace audio {
|
||||||
namespace orchestra {
|
namespace orchestra {
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#if defined(ORCHESTRA_BUILD_ASIO)
|
#if defined(ORCHESTRA_BUILD_ASIO)
|
||||||
|
|
||||||
#include <audio/orchestra/Interface.h>
|
#include <audio/orchestra/Interface.hpp>
|
||||||
#include <audio/orchestra/debug.h>
|
#include <audio/orchestra/debug.hpp>
|
||||||
|
|
||||||
ememory::SharedPtr<audio::orchestra::Api> audio::orchestra::api::Asio::create() {
|
ememory::SharedPtr<audio::orchestra::Api> audio::orchestra::api::Asio::create() {
|
||||||
return ememory::SharedPtr<audio::orchestra::api::Asio>(new audio::orchestra::api::Asio());
|
return ememory::SharedPtr<audio::orchestra::api::Asio>(new audio::orchestra::api::Asio());
|
||||||
|
@@ -14,11 +14,11 @@
|
|||||||
|
|
||||||
#if defined(__MACOSX_CORE__) || defined(ORCHESTRA_BUILD_MACOSX_CORE)
|
#if defined(__MACOSX_CORE__) || defined(ORCHESTRA_BUILD_MACOSX_CORE)
|
||||||
|
|
||||||
#include <audio/orchestra/Interface.h>
|
#include <audio/orchestra/Interface.hpp>
|
||||||
#include <audio/orchestra/debug.h>
|
#include <audio/orchestra/debug.hpp>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <ethread/tools.h>
|
#include <ethread/tools.hpp>
|
||||||
#include <audio/orchestra/api/Core.h>
|
#include <audio/orchestra/api/Core.hpp>
|
||||||
|
|
||||||
ememory::SharedPtr<audio::orchestra::Api> audio::orchestra::api::Core::create() {
|
ememory::SharedPtr<audio::orchestra::Api> audio::orchestra::api::Core::create() {
|
||||||
return ememory::SharedPtr<audio::orchestra::api::Core>(new audio::orchestra::api::Core());
|
return ememory::SharedPtr<audio::orchestra::api::Core>(new audio::orchestra::api::Core());
|
||||||
@@ -635,7 +635,7 @@ bool audio::orchestra::api::Core::open(uint32_t _device,
|
|||||||
if (microCounter > 5000000) {
|
if (microCounter > 5000000) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
usleep(5000);
|
std::this_thread::sleep_for(std::chrono::milliseconds(5));
|
||||||
}
|
}
|
||||||
// Remove the property listener.
|
// Remove the property listener.
|
||||||
AudioObjectRemovePropertyListener(id, &tmp, &rateListener, (void *) &reportedRate);
|
AudioObjectRemovePropertyListener(id, &tmp, &rateListener, (void *) &reportedRate);
|
||||||
|
@@ -48,6 +48,8 @@ namespace audio {
|
|||||||
const audio::Time& _time);
|
const audio::Time& _time);
|
||||||
public:
|
public:
|
||||||
ememory::SharedPtr<CoreIosPrivate> m_private;
|
ememory::SharedPtr<CoreIosPrivate> m_private;
|
||||||
|
uint32_t getDefaultInputDevice();
|
||||||
|
uint32_t getDefaultOutputDevice();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -10,11 +10,11 @@
|
|||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
#import <AudioToolbox/AudioToolbox.h>
|
#import <AudioToolbox/AudioToolbox.h>
|
||||||
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <audio/orchestra/Interface.h>
|
#include <audio/orchestra/Interface.hpp>
|
||||||
#include <audio/orchestra/debug.h>
|
#include <audio/orchestra/debug.hpp>
|
||||||
#include <limits.h>
|
#include <climits>
|
||||||
#include <audio/orchestra/api/CoreIos.h>
|
#include <audio/orchestra/api/CoreIos.hpp>
|
||||||
|
|
||||||
ememory::SharedPtr<audio::orchestra::Api> audio::orchestra::api::CoreIos::create() {
|
ememory::SharedPtr<audio::orchestra::Api> audio::orchestra::api::CoreIos::create() {
|
||||||
ATA_INFO("Create CoreIos device ... ");
|
ATA_INFO("Create CoreIos device ... ");
|
||||||
@@ -37,7 +37,7 @@ namespace audio {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
audio::orchestra::api::CoreIos::CoreIos(void) :
|
audio::orchestra::api::CoreIos::CoreIos() :
|
||||||
m_private(new audio::orchestra::api::CoreIosPrivate()) {
|
m_private(new audio::orchestra::api::CoreIosPrivate()) {
|
||||||
ATA_INFO("new CoreIos");
|
ATA_INFO("new CoreIos");
|
||||||
int32_t deviceCount = 2;
|
int32_t deviceCount = 2;
|
||||||
@@ -45,45 +45,67 @@ audio::orchestra::api::CoreIos::CoreIos(void) :
|
|||||||
audio::orchestra::DeviceInfo tmp;
|
audio::orchestra::DeviceInfo tmp;
|
||||||
// Add default output format :
|
// Add default output format :
|
||||||
tmp.name = "speaker";
|
tmp.name = "speaker";
|
||||||
|
tmp.input = false;
|
||||||
tmp.sampleRates.push_back(48000);
|
tmp.sampleRates.push_back(48000);
|
||||||
tmp.channels.push_back(audio::channel_frontRight);
|
tmp.channels.push_back(audio::channel_frontRight);
|
||||||
tmp.channels.push_back(audio::channel_frontLeft);
|
tmp.channels.push_back(audio::channel_frontLeft);
|
||||||
tmp.isDefault = true;
|
|
||||||
tmp.nativeFormats.push_back(audio::format_int16);
|
tmp.nativeFormats.push_back(audio::format_int16);
|
||||||
|
tmp.isDefault = true;
|
||||||
|
tmp.isCorrect = true;
|
||||||
m_devices.push_back(tmp);
|
m_devices.push_back(tmp);
|
||||||
// add default input format:
|
// add default input format:
|
||||||
tmp.name = "microphone";
|
tmp.name = "microphone";
|
||||||
|
tmp.input = true;
|
||||||
tmp.sampleRates.push_back(48000);
|
tmp.sampleRates.push_back(48000);
|
||||||
tmp.channels.push_back(audio::channel_frontRight);
|
tmp.channels.push_back(audio::channel_frontRight);
|
||||||
tmp.channels.push_back(audio::channel_frontLeft);
|
tmp.channels.push_back(audio::channel_frontLeft);
|
||||||
tmp.isDefault = true;
|
|
||||||
tmp.nativeFormats.push_back(audio::format_int16);
|
tmp.nativeFormats.push_back(audio::format_int16);
|
||||||
|
tmp.isDefault = true;
|
||||||
|
tmp.isCorrect = true;
|
||||||
m_devices.push_back(tmp);
|
m_devices.push_back(tmp);
|
||||||
ATA_INFO("Create CoreIOs interface (end)");
|
ATA_INFO("Create CoreIOs interface (end)");
|
||||||
}
|
}
|
||||||
|
|
||||||
audio::orchestra::api::CoreIos::~CoreIos(void) {
|
uint32_t audio::orchestra::api::CoreIos::getDefaultInputDevice() {
|
||||||
|
// Should be implemented in subclasses if possible.
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t audio::orchestra::api::CoreIos::getDefaultOutputDevice() {
|
||||||
|
// Should be implemented in subclasses if possible.
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
audio::orchestra::api::CoreIos::~CoreIos() {
|
||||||
ATA_INFO("Destroy CoreIOs interface");
|
ATA_INFO("Destroy CoreIOs interface");
|
||||||
AudioUnitUninitialize(m_private->audioUnit);
|
AudioUnitUninitialize(m_private->audioUnit);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t audio::orchestra::api::CoreIos::getDeviceCount(void) {
|
uint32_t audio::orchestra::api::CoreIos::getDeviceCount() {
|
||||||
//ATA_INFO("Get device count:"<< m_devices.size());
|
//ATA_INFO("Get device count:"<< m_devices.size());
|
||||||
return m_devices.size();
|
return m_devices.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
audio::orchestra::DeviceInfo audio::orchestra::api::CoreIos::getDeviceInfo(uint32_t _device) {
|
audio::orchestra::DeviceInfo audio::orchestra::api::CoreIos::getDeviceInfo(uint32_t _device) {
|
||||||
//ATA_INFO("Get device info ...");
|
//ATA_INFO("Get device info ...");
|
||||||
|
if (_device >= m_devices.size()) {
|
||||||
|
audio::orchestra::DeviceInfo tmp;
|
||||||
|
tmp.sampleRates.push_back(0);
|
||||||
|
tmp.channels.push_back(audio::channel_frontCenter);
|
||||||
|
tmp.isDefault = false;
|
||||||
|
tmp.nativeFormats.push_back(audio::format_int8);
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
return m_devices[_device];
|
return m_devices[_device];
|
||||||
}
|
}
|
||||||
|
|
||||||
enum audio::orchestra::error audio::orchestra::api::CoreIos::closeStream(void) {
|
enum audio::orchestra::error audio::orchestra::api::CoreIos::closeStream() {
|
||||||
ATA_INFO("Close Stream");
|
ATA_INFO("Close Stream");
|
||||||
// Can not close the stream now...
|
// Can not close the stream now...
|
||||||
return audio::orchestra::error_none;
|
return audio::orchestra::error_none;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum audio::orchestra::error audio::orchestra::api::CoreIos::startStream(void) {
|
enum audio::orchestra::error audio::orchestra::api::CoreIos::startStream() {
|
||||||
ATA_INFO("Start Stream");
|
ATA_INFO("Start Stream");
|
||||||
// TODO : Check return ...
|
// TODO : Check return ...
|
||||||
audio::orchestra::Api::startStream();
|
audio::orchestra::Api::startStream();
|
||||||
@@ -92,14 +114,14 @@ enum audio::orchestra::error audio::orchestra::api::CoreIos::startStream(void) {
|
|||||||
return audio::orchestra::error_none;
|
return audio::orchestra::error_none;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum audio::orchestra::error audio::orchestra::api::CoreIos::stopStream(void) {
|
enum audio::orchestra::error audio::orchestra::api::CoreIos::stopStream() {
|
||||||
ATA_INFO("Stop stream");
|
ATA_INFO("Stop stream");
|
||||||
OSStatus status = AudioOutputUnitStop(m_private->audioUnit);
|
OSStatus status = AudioOutputUnitStop(m_private->audioUnit);
|
||||||
// Can not close the stream now...
|
// Can not close the stream now...
|
||||||
return audio::orchestra::error_none;
|
return audio::orchestra::error_none;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum audio::orchestra::error audio::orchestra::api::CoreIos::abortStream(void) {
|
enum audio::orchestra::error audio::orchestra::api::CoreIos::abortStream() {
|
||||||
ATA_INFO("Abort Stream");
|
ATA_INFO("Abort Stream");
|
||||||
OSStatus status = AudioOutputUnitStop(m_private->audioUnit);
|
OSStatus status = AudioOutputUnitStop(m_private->audioUnit);
|
||||||
// Can not close the stream now...
|
// Can not close the stream now...
|
||||||
@@ -111,7 +133,10 @@ void audio::orchestra::api::CoreIos::callBackEvent(void* _data,
|
|||||||
const audio::Time& _time) {
|
const audio::Time& _time) {
|
||||||
int32_t doStopStream = 0;
|
int32_t doStopStream = 0;
|
||||||
std::vector<enum audio::orchestra::status> status;
|
std::vector<enum audio::orchestra::status> status;
|
||||||
|
if ( m_mode == audio::orchestra::mode_output
|
||||||
|
|| m_mode == audio::orchestra::mode_duplex) {
|
||||||
if (m_doConvertBuffer[modeToIdTable(audio::orchestra::mode_output)] == true) {
|
if (m_doConvertBuffer[modeToIdTable(audio::orchestra::mode_output)] == true) {
|
||||||
|
ATA_INFO("get output DATA : " << uint64_t(&m_userBuffer[modeToIdTable(audio::orchestra::mode_output)][0]));
|
||||||
doStopStream = m_callback(nullptr,
|
doStopStream = m_callback(nullptr,
|
||||||
audio::Time(),
|
audio::Time(),
|
||||||
&m_userBuffer[modeToIdTable(audio::orchestra::mode_output)][0],
|
&m_userBuffer[modeToIdTable(audio::orchestra::mode_output)][0],
|
||||||
@@ -120,6 +145,18 @@ void audio::orchestra::api::CoreIos::callBackEvent(void* _data,
|
|||||||
status);
|
status);
|
||||||
convertBuffer((char*)_data, &m_userBuffer[modeToIdTable(audio::orchestra::mode_output)][0], m_convertInfo[modeToIdTable(audio::orchestra::mode_output)]);
|
convertBuffer((char*)_data, &m_userBuffer[modeToIdTable(audio::orchestra::mode_output)][0], m_convertInfo[modeToIdTable(audio::orchestra::mode_output)]);
|
||||||
} else {
|
} else {
|
||||||
|
ATA_INFO("have output DATA : " << uint64_t(_data));
|
||||||
|
doStopStream = m_callback(nullptr,
|
||||||
|
_time,
|
||||||
|
_data,
|
||||||
|
audio::Time(),
|
||||||
|
_nbChunk,
|
||||||
|
status);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( m_mode == audio::orchestra::mode_input
|
||||||
|
|| m_mode == audio::orchestra::mode_duplex) {
|
||||||
|
ATA_INFO("have input DATA : " << uint64_t(_data));
|
||||||
doStopStream = m_callback(_data,
|
doStopStream = m_callback(_data,
|
||||||
_time,
|
_time,
|
||||||
nullptr,
|
nullptr,
|
||||||
@@ -154,7 +191,7 @@ static OSStatus playbackCallback(void *_userData,
|
|||||||
for (int32_t iii=0; iii < _ioData->mNumberBuffers; iii++) {
|
for (int32_t iii=0; iii < _ioData->mNumberBuffers; iii++) {
|
||||||
AudioBuffer buffer = _ioData->mBuffers[iii];
|
AudioBuffer buffer = _ioData->mBuffers[iii];
|
||||||
int32_t numberFrame = buffer.mDataByteSize/2/*stereo*/ /sizeof(int16_t);
|
int32_t numberFrame = buffer.mDataByteSize/2/*stereo*/ /sizeof(int16_t);
|
||||||
ATA_VERBOSE("request data size: " << numberFrame << " busNumber=" << _inBusNumber);
|
ATA_INFO("request data size: " << numberFrame << " busNumber=" << _inBusNumber);
|
||||||
myClass->callBackEvent(buffer.mData, numberFrame, tmpTimeime);
|
myClass->callBackEvent(buffer.mData, numberFrame, tmpTimeime);
|
||||||
}
|
}
|
||||||
return noErr;
|
return noErr;
|
||||||
@@ -175,7 +212,8 @@ bool audio::orchestra::api::CoreIos::open(uint32_t _device,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
bool ret = true;
|
bool ret = true;
|
||||||
|
// TODO : This is a bad ack ....
|
||||||
|
m_mode = audio::orchestra::mode_output;
|
||||||
// configure Airtaudio internal configuration:
|
// configure Airtaudio internal configuration:
|
||||||
m_userFormat = _format;
|
m_userFormat = _format;
|
||||||
m_nUserChannels[modeToIdTable(_mode)] = _channels;
|
m_nUserChannels[modeToIdTable(_mode)] = _channels;
|
||||||
|
@@ -7,10 +7,10 @@
|
|||||||
|
|
||||||
// Windows DirectSound API
|
// Windows DirectSound API
|
||||||
#if defined(ORCHESTRA_BUILD_DS)
|
#if defined(ORCHESTRA_BUILD_DS)
|
||||||
#include <audio/orchestra/Interface.h>
|
#include <audio/orchestra/Interface.hpp>
|
||||||
#include <audio/orchestra/debug.h>
|
#include <audio/orchestra/debug.hpp>
|
||||||
#include <ethread/tools.h>
|
#include <ethread/tools.hpp>
|
||||||
#include <audio/orchestra/api/Ds.h>
|
#include <audio/orchestra/api/Ds.hpp>
|
||||||
|
|
||||||
ememory::SharedPtr<audio::orchestra::Api> audio::orchestra::api::Ds::create() {
|
ememory::SharedPtr<audio::orchestra::Api> audio::orchestra::api::Ds::create() {
|
||||||
return ememory::SharedPtr<audio::orchestra::api::Ds>(new audio::orchestra::api::Ds());
|
return ememory::SharedPtr<audio::orchestra::api::Ds>(new audio::orchestra::api::Ds());
|
||||||
@@ -25,7 +25,7 @@ ememory::SharedPtr<audio::orchestra::Api> audio::orchestra::api::Ds::create() {
|
|||||||
// Changed device query structure for RtAudio 4.0.7, January 2010
|
// Changed device query structure for RtAudio 4.0.7, January 2010
|
||||||
|
|
||||||
#include <dsound.h>
|
#include <dsound.h>
|
||||||
#include <assert.h>
|
#include <cassert>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#if defined(__MINGW32__)
|
#if defined(__MINGW32__)
|
||||||
@@ -986,7 +986,8 @@ enum audio::orchestra::error audio::orchestra::api::Ds::abortStream() {
|
|||||||
|
|
||||||
void audio::orchestra::api::Ds::callbackEvent() {
|
void audio::orchestra::api::Ds::callbackEvent() {
|
||||||
ethread::setName("DS IO-" + m_name);
|
ethread::setName("DS IO-" + m_name);
|
||||||
if (m_state == audio::orchestra::state::stopped || m_state == audio::orchestra::state_stopping) {
|
if ( m_state == audio::orchestra::state::stopped
|
||||||
|
|| m_state == audio::orchestra::state::stopping) {
|
||||||
Sleep(50); // sleep 50 milliseconds
|
Sleep(50); // sleep 50 milliseconds
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -6,8 +6,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(ORCHESTRA_BUILD_DUMMY)
|
#if defined(ORCHESTRA_BUILD_DUMMY)
|
||||||
#include <audio/orchestra/api/Dummy.h>
|
#include <audio/orchestra/api/Dummy.hpp>
|
||||||
#include <audio/orchestra/debug.h>
|
#include <audio/orchestra/debug.hpp>
|
||||||
|
|
||||||
ememory::SharedPtr<audio::orchestra::Api> audio::orchestra::api::Dummy::create() {
|
ememory::SharedPtr<audio::orchestra::Api> audio::orchestra::api::Dummy::create() {
|
||||||
return ememory::SharedPtr<audio::orchestra::api::Dummy>(new audio::orchestra::api::Dummy());
|
return ememory::SharedPtr<audio::orchestra::api::Dummy>(new audio::orchestra::api::Dummy());
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#ifdef ORCHESTRA_BUILD_DUMMY
|
#ifdef ORCHESTRA_BUILD_DUMMY
|
||||||
|
|
||||||
#include <audio/orchestra/Interface.h>
|
#include <audio/orchestra/Interface.hpp>
|
||||||
|
|
||||||
namespace audio {
|
namespace audio {
|
||||||
namespace orchestra {
|
namespace orchestra {
|
@@ -7,14 +7,14 @@
|
|||||||
|
|
||||||
// must run before :
|
// must run before :
|
||||||
#if defined(ORCHESTRA_BUILD_JACK)
|
#if defined(ORCHESTRA_BUILD_JACK)
|
||||||
#include <unistd.h>
|
|
||||||
#include <limits.h>
|
#include <climits>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <audio/orchestra/Interface.h>
|
#include <audio/orchestra/Interface.hpp>
|
||||||
#include <audio/orchestra/debug.h>
|
#include <audio/orchestra/debug.hpp>
|
||||||
#include <string.h>
|
#include <cstring>
|
||||||
#include <ethread/tools.h>
|
#include <ethread/tools.hpp>
|
||||||
#include <audio/orchestra/api/Jack.h>
|
#include <audio/orchestra/api/Jack.hpp>
|
||||||
|
|
||||||
ememory::SharedPtr<audio::orchestra::Api> audio::orchestra::api::Jack::create() {
|
ememory::SharedPtr<audio::orchestra::Api> audio::orchestra::api::Jack::create() {
|
||||||
return ememory::SharedPtr<audio::orchestra::api::Jack>(new audio::orchestra::api::Jack());
|
return ememory::SharedPtr<audio::orchestra::api::Jack>(new audio::orchestra::api::Jack());
|
||||||
@@ -52,7 +52,7 @@ ememory::SharedPtr<audio::orchestra::Api> audio::orchestra::api::Jack::create()
|
|||||||
// stream cannot be opened.
|
// stream cannot be opened.
|
||||||
|
|
||||||
#include <jack/jack.h>
|
#include <jack/jack.h>
|
||||||
#include <unistd.h>
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
|
|
||||||
|
@@ -8,16 +8,16 @@
|
|||||||
|
|
||||||
#if defined(ORCHESTRA_BUILD_PULSE)
|
#if defined(ORCHESTRA_BUILD_PULSE)
|
||||||
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <limits.h>
|
#include <climits>
|
||||||
#include <audio/orchestra/Interface.h>
|
#include <audio/orchestra/Interface.hpp>
|
||||||
#include <audio/orchestra/debug.h>
|
#include <audio/orchestra/debug.hpp>
|
||||||
#include <pulse/error.h>
|
#include <pulse/error.h>
|
||||||
#include <pulse/simple.h>
|
#include <pulse/simple.h>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <ethread/tools.h>
|
#include <ethread/tools.hpp>
|
||||||
#include <audio/orchestra/api/PulseDeviceList.h>
|
#include <audio/orchestra/api/PulseDeviceList.hpp>
|
||||||
#include <audio/orchestra/api/Pulse.h>
|
#include <audio/orchestra/api/Pulse.hpp>
|
||||||
|
|
||||||
ememory::SharedPtr<audio::orchestra::Api> audio::orchestra::api::Pulse::create() {
|
ememory::SharedPtr<audio::orchestra::Api> audio::orchestra::api::Pulse::create() {
|
||||||
return ememory::SharedPtr<audio::orchestra::api::Pulse>(new audio::orchestra::api::Pulse());
|
return ememory::SharedPtr<audio::orchestra::api::Pulse>(new audio::orchestra::api::Pulse());
|
||||||
|
@@ -7,15 +7,15 @@
|
|||||||
|
|
||||||
#if defined(ORCHESTRA_BUILD_PULSE)
|
#if defined(ORCHESTRA_BUILD_PULSE)
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <cstdio>
|
||||||
#include <string.h>
|
#include <cstring>
|
||||||
#include <pulse/pulseaudio.h>
|
#include <pulse/pulseaudio.hpp>
|
||||||
#include <audio/orchestra/api/PulseDeviceList.h>
|
#include <audio/orchestra/api/PulseDeviceList.hpp>
|
||||||
#include <audio/orchestra/debug.h>
|
#include <audio/orchestra/debug.hpp>
|
||||||
#include <audio/Time.h>
|
#include <audio/Time.hpp>
|
||||||
#include <audio/Duration.h>
|
#include <audio/Duration.hpp>
|
||||||
#include <audio/format.h>
|
#include <audio/format.hpp>
|
||||||
#include <etk/stdTools.h>
|
#include <etk/stdTools.hpp>
|
||||||
|
|
||||||
// This callback gets called when our context changes state. We really only
|
// This callback gets called when our context changes state. We really only
|
||||||
// care about when it's ready or if it has failed
|
// care about when it's ready or if it has failed
|
||||||
|
@@ -7,8 +7,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#ifdef ORCHESTRA_BUILD_PULSE
|
#ifdef ORCHESTRA_BUILD_PULSE
|
||||||
|
|
||||||
#include <etk/types.h>
|
#include <etk/types.hpp>
|
||||||
#include <audio/orchestra/DeviceInfo.h>
|
#include <audio/orchestra/DeviceInfo.hpp>
|
||||||
|
|
||||||
namespace audio {
|
namespace audio {
|
||||||
namespace orchestra {
|
namespace orchestra {
|
@@ -1,25 +0,0 @@
|
|||||||
/** @file
|
|
||||||
* @author Edouard DUPIN
|
|
||||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
|
||||||
* @license APACHE v2.0 (see license file)
|
|
||||||
* @fork from RTAudio
|
|
||||||
*/
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <thread>
|
|
||||||
#include <condition_variable>
|
|
||||||
#include <mutex>
|
|
||||||
#include <chrono>
|
|
||||||
#include <functional>
|
|
||||||
#include <ememory/memory.h>
|
|
||||||
#include <audio/channel.h>
|
|
||||||
#include <audio/format.h>
|
|
||||||
#include <audio/orchestra/error.h>
|
|
||||||
#include <audio/orchestra/status.h>
|
|
||||||
#include <audio/orchestra/Flags.h>
|
|
||||||
|
|
||||||
#include <audio/orchestra/CallbackInfo.h>
|
|
||||||
#include <audio/orchestra/DeviceInfo.h>
|
|
||||||
#include <audio/orchestra/StreamOptions.h>
|
|
||||||
#include <audio/orchestra/StreamParameters.h>
|
|
||||||
|
|
25
audio/orchestra/base.hpp
Normal file
25
audio/orchestra/base.hpp
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
/** @file
|
||||||
|
* @author Edouard DUPIN
|
||||||
|
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||||
|
* @license APACHE v2.0 (see license file)
|
||||||
|
* @fork from RTAudio
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <thread>
|
||||||
|
#include <condition_variable>
|
||||||
|
#include <mutex>
|
||||||
|
#include <chrono>
|
||||||
|
#include <functional>
|
||||||
|
#include <ememory/memory.hpp>
|
||||||
|
#include <audio/channel.hpp>
|
||||||
|
#include <audio/format.hpp>
|
||||||
|
#include <audio/orchestra/error.hpp>
|
||||||
|
#include <audio/orchestra/status.hpp>
|
||||||
|
#include <audio/orchestra/Flags.hpp>
|
||||||
|
|
||||||
|
#include <audio/orchestra/CallbackInfo.hpp>
|
||||||
|
#include <audio/orchestra/DeviceInfo.hpp>
|
||||||
|
#include <audio/orchestra/StreamOptions.hpp>
|
||||||
|
#include <audio/orchestra/StreamParameters.hpp>
|
||||||
|
|
@@ -5,7 +5,7 @@
|
|||||||
* @fork from RTAudio
|
* @fork from RTAudio
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <audio/orchestra/debug.h>
|
#include <audio/orchestra/debug.hpp>
|
||||||
|
|
||||||
int32_t audio::orchestra::getLogId() {
|
int32_t audio::orchestra::getLogId() {
|
||||||
static int32_t g_val = elog::registerInstance("audio-orchestra");
|
static int32_t g_val = elog::registerInstance("audio-orchestra");
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <elog/log.h>
|
#include <elog/log.hpp>
|
||||||
|
|
||||||
namespace audio {
|
namespace audio {
|
||||||
namespace orchestra {
|
namespace orchestra {
|
@@ -5,5 +5,5 @@
|
|||||||
* @fork from RTAudio
|
* @fork from RTAudio
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <audio/orchestra/error.h>
|
#include <audio/orchestra/error.hpp>
|
||||||
#include <audio/orchestra/debug.h>
|
#include <audio/orchestra/debug.hpp>
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <etk/types.h>
|
#include <etk/types.hpp>
|
||||||
|
|
||||||
namespace audio {
|
namespace audio {
|
||||||
namespace orchestra {
|
namespace orchestra {
|
@@ -5,8 +5,8 @@
|
|||||||
* @fork from RTAudio
|
* @fork from RTAudio
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <audio/orchestra/mode.h>
|
#include <audio/orchestra/mode.hpp>
|
||||||
#include <audio/orchestra/debug.h>
|
#include <audio/orchestra/debug.hpp>
|
||||||
|
|
||||||
int32_t audio::orchestra::modeToIdTable(enum mode _mode) {
|
int32_t audio::orchestra::modeToIdTable(enum mode _mode) {
|
||||||
switch (_mode) {
|
switch (_mode) {
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <etk/types.h>
|
#include <etk/types.hpp>
|
||||||
|
|
||||||
namespace audio {
|
namespace audio {
|
||||||
namespace orchestra {
|
namespace orchestra {
|
@@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <etk/types.h>
|
#include <etk/types.hpp>
|
||||||
|
|
||||||
namespace audio {
|
namespace audio {
|
||||||
namespace orchestra {
|
namespace orchestra {
|
@@ -5,8 +5,8 @@
|
|||||||
* @fork from RTAudio
|
* @fork from RTAudio
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <audio/orchestra/status.h>
|
#include <audio/orchestra/status.hpp>
|
||||||
#include <audio/orchestra/debug.h>
|
#include <audio/orchestra/debug.hpp>
|
||||||
static const char* listValue[] = {
|
static const char* listValue[] = {
|
||||||
"ok",
|
"ok",
|
||||||
"overflow",
|
"overflow",
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <etk/types.h>
|
#include <etk/types.hpp>
|
||||||
|
|
||||||
namespace audio {
|
namespace audio {
|
||||||
namespace orchestra {
|
namespace orchestra {
|
@@ -5,8 +5,8 @@
|
|||||||
* @fork from RTAudio
|
* @fork from RTAudio
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <audio/orchestra/type.h>
|
#include <audio/orchestra/type.hpp>
|
||||||
#include <audio/orchestra/debug.h>
|
#include <audio/orchestra/debug.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
@@ -6,8 +6,8 @@
|
|||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <etk/types.h>
|
#include <etk/types.hpp>
|
||||||
#include <etk/stdTools.h>
|
#include <etk/stdTools.hpp>
|
||||||
|
|
||||||
namespace audio {
|
namespace audio {
|
||||||
namespace orchestra {
|
namespace orchestra {
|
@@ -1,91 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 2.8.3)
|
|
||||||
project(audio_orchestra)
|
|
||||||
|
|
||||||
set(CMAKE_VERBOSE_MAKEFILE ON)
|
|
||||||
|
|
||||||
## Find catkin macros and libraries
|
|
||||||
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
|
|
||||||
## is used, also find other catkin packages
|
|
||||||
find_package(catkin REQUIRED COMPONENTS
|
|
||||||
etk
|
|
||||||
audio
|
|
||||||
)
|
|
||||||
|
|
||||||
find_package(ALSA REQUIRED)
|
|
||||||
|
|
||||||
###################################
|
|
||||||
## catkin specific configuration ##
|
|
||||||
###################################
|
|
||||||
## The catkin_package macro generates cmake config files for your package
|
|
||||||
## Declare things to be passed to dependent projects
|
|
||||||
## INCLUDE_DIRS: uncomment this if you package contains header files
|
|
||||||
## LIBRARIES: libraries you create in this project that dependent projects also need
|
|
||||||
## CATKIN_DEPENDS: catkin_packages dependent projects also need
|
|
||||||
## DEPENDS: system dependencies of this project that dependent projects also need
|
|
||||||
catkin_package(
|
|
||||||
INCLUDE_DIRS ../
|
|
||||||
LIBRARIES ${PROJECT_NAME}
|
|
||||||
CATKIN_DEPENDS etk audio
|
|
||||||
DEPENDS system_lib
|
|
||||||
)
|
|
||||||
|
|
||||||
###########
|
|
||||||
## Build ##
|
|
||||||
###########
|
|
||||||
|
|
||||||
## Specify additional locations of header files
|
|
||||||
## Your package locations should be listed before other locations
|
|
||||||
include_directories(
|
|
||||||
..
|
|
||||||
${catkin_INCLUDE_DIRS}
|
|
||||||
)
|
|
||||||
|
|
||||||
## Declare a cpp library
|
|
||||||
add_library(${PROJECT_NAME}
|
|
||||||
../audio/orchestra/debug.cpp
|
|
||||||
../audio/orchestra/status.cpp
|
|
||||||
../audio/orchestra/type.cpp
|
|
||||||
../audio/orchestra/mode.cpp
|
|
||||||
../audio/orchestra/state.cpp
|
|
||||||
../audio/orchestra/error.cpp
|
|
||||||
../audio/orchestra/base.cpp
|
|
||||||
../audio/orchestra/Interface.cpp
|
|
||||||
../audio/orchestra/Flags.cpp
|
|
||||||
../audio/orchestra/Api.cpp
|
|
||||||
../audio/orchestra/DeviceInfo.cpp
|
|
||||||
../audio/orchestra/StreamOptions.cpp
|
|
||||||
../audio/orchestra/api/Dummy.cpp
|
|
||||||
../audio/orchestra/api/Alsa.cpp
|
|
||||||
../audio/orchestra/api/Jack.cpp
|
|
||||||
../audio/orchestra/api/Pulse.cpp
|
|
||||||
../audio/orchestra/api/Oss.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
add_definitions(-D__LINUX_ALSA__)
|
|
||||||
add_definitions(-D__DUMMY__)
|
|
||||||
|
|
||||||
## Add cmake target dependencies of the executable/library
|
|
||||||
## as an example, message headers may need to be generated before nodes
|
|
||||||
#add_dependencies(${PROJECT_NAME} test_perfo_core_generate_messages_cpp)
|
|
||||||
|
|
||||||
## Specify libraries to link a library or executable target against
|
|
||||||
target_link_libraries(${PROJECT_NAME}
|
|
||||||
${ALSA_LIBRARIES}
|
|
||||||
${catkin_LIBRARIES}
|
|
||||||
)
|
|
||||||
|
|
||||||
#############
|
|
||||||
## Install ##
|
|
||||||
#############
|
|
||||||
|
|
||||||
## Mark executables and/or libraries for installation
|
|
||||||
install(TARGETS ${PROJECT_NAME}
|
|
||||||
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
|
||||||
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
|
||||||
)
|
|
||||||
|
|
||||||
## Mark cpp header files for installation
|
|
||||||
install(DIRECTORY ../audio/orchestra/
|
|
||||||
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
|
|
||||||
FILES_MATCHING PATTERN "*.h"
|
|
||||||
)
|
|
@@ -1,13 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<package>
|
|
||||||
<name>audio_orchestra</name>
|
|
||||||
<version>0.3.0</version>
|
|
||||||
<description>Ewol RTAudio fork</description>
|
|
||||||
<maintainer email="yui.heero@gmail.com">Edouard DUPIN</maintainer>
|
|
||||||
<license>Apache-2.0</license>
|
|
||||||
<build_depend>etk</build_depend>
|
|
||||||
<build_depend>audio</build_depend>
|
|
||||||
<buildtool_depend>catkin</buildtool_depend>
|
|
||||||
<run_depend>etk</run_depend>
|
|
||||||
<run_depend>audio</run_depend>
|
|
||||||
</package>
|
|
83
doc/build.md
Normal file
83
doc/build.md
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
Build lib & build sample {#audio_orchestra_build}
|
||||||
|
========================
|
||||||
|
|
||||||
|
@tableofcontents
|
||||||
|
|
||||||
|
Download: {#audio_orchestra_build_download}
|
||||||
|
=========
|
||||||
|
|
||||||
|
ege use some tools to manage source and build it:
|
||||||
|
|
||||||
|
need google repo: {#audio_orchestra_build_download_repo}
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
see: http://source.android.com/source/downloading.html#installing-repo
|
||||||
|
|
||||||
|
On all platform:
|
||||||
|
```{.sh}
|
||||||
|
mkdir ~/.bin
|
||||||
|
PATH=~/.bin:$PATH
|
||||||
|
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/.bin/repo
|
||||||
|
chmod a+x ~/.bin/repo
|
||||||
|
```
|
||||||
|
|
||||||
|
On ubuntu
|
||||||
|
```{.sh}
|
||||||
|
sudo apt-get install repo
|
||||||
|
```
|
||||||
|
|
||||||
|
On archlinux
|
||||||
|
```{.sh}
|
||||||
|
sudo pacman -S repo
|
||||||
|
```
|
||||||
|
|
||||||
|
lutin (build-system): {#audio_orchestra_build_download_lutin}
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
```{.sh}
|
||||||
|
pip install lutin --user
|
||||||
|
# optionnal dependency of lutin (manage image changing size for application release)
|
||||||
|
pip install pillow --user
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
dependency: {#audio_orchestra_build_download_dependency}
|
||||||
|
-----------
|
||||||
|
|
||||||
|
```{.sh}
|
||||||
|
mkdir -p WORKING_DIRECTORY/framework
|
||||||
|
cd WORKING_DIRECTORY/framework
|
||||||
|
repo init -u git://github.com/atria-soft/manifest.git
|
||||||
|
repo sync -j8
|
||||||
|
cd ../..
|
||||||
|
```
|
||||||
|
|
||||||
|
sources: {#audio_orchestra_build_download_sources}
|
||||||
|
--------
|
||||||
|
|
||||||
|
They are already download in the repo manifest in:
|
||||||
|
|
||||||
|
```{.sh}
|
||||||
|
cd WORKING_DIRECTORY/framework/atria-soft/audio_orchestra
|
||||||
|
```
|
||||||
|
|
||||||
|
Build: {#audio_orchestra_build_build}
|
||||||
|
======
|
||||||
|
|
||||||
|
you must stay in zour working directory...
|
||||||
|
```{.sh}
|
||||||
|
cd WORKING_DIRECTORY
|
||||||
|
```
|
||||||
|
|
||||||
|
library: {#audio_orchestra_build_build_library}
|
||||||
|
--------
|
||||||
|
|
||||||
|
```{.sh}
|
||||||
|
lutin -mdebug audio-orchestra
|
||||||
|
```
|
||||||
|
|
||||||
|
Sample: {#audio_orchestra_build_build_sample}
|
||||||
|
-------
|
||||||
|
|
||||||
|
No smaple availlable for now ...
|
||||||
|
|
50
doc/mainpage.md
Normal file
50
doc/mainpage.md
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
AUDIO-ORCHESTRA library {#mainpage}
|
||||||
|
=======================
|
||||||
|
|
||||||
|
@tableofcontents
|
||||||
|
|
||||||
|
What is AUDIO-ORCHESTRA: {#audio_orchestra_mainpage_what}
|
||||||
|
========================
|
||||||
|
|
||||||
|
AUDIO-ORCHESTRA, is a fork of RTAudio lib (with port for Android, and IOs).
|
||||||
|
|
||||||
|
This is a cross API of Audio wrapping the Hardware.
|
||||||
|
|
||||||
|
This library is not friendy usable, use audio-river to have a correct and simple multiple-flow API
|
||||||
|
|
||||||
|
What it does: {#audio_orchestra_mainpage_what_it_does}
|
||||||
|
-------------
|
||||||
|
|
||||||
|
- Open a strem audio in Input or output
|
||||||
|
- synchronise 2 flow
|
||||||
|
- open on some platform: Android, Linux, MacOs, Ios, Windows
|
||||||
|
|
||||||
|
AUDIO-ORCHESTRA is dependent of the STL (compatible with MacOs stl (CXX))
|
||||||
|
|
||||||
|
|
||||||
|
What languages are supported? {#audio_orchestra_mainpage_language}
|
||||||
|
=============================
|
||||||
|
|
||||||
|
AUDIO-ORCHESTRA is written in C++.
|
||||||
|
|
||||||
|
|
||||||
|
Are there any licensing restrictions? {#audio_orchestra_mainpage_license_restriction}
|
||||||
|
=====================================
|
||||||
|
|
||||||
|
AUDIO-ORCHESTRA is **FREE software** and _all sub-library are FREE and staticly linkable !!!_
|
||||||
|
|
||||||
|
|
||||||
|
License (MIT) {#audio_orchestra_mainpage_license}
|
||||||
|
=============
|
||||||
|
|
||||||
|
Copyright AUDIO-ORCHESTRA Edouard DUPIN
|
||||||
|
|
||||||
|
MIT ...
|
||||||
|
|
||||||
|
|
||||||
|
Other pages {#audio_orchestra_mainpage_sub_page}
|
||||||
|
===========
|
||||||
|
|
||||||
|
- @ref audio_orchestra_build
|
||||||
|
- [**ewol coding style**](http://atria-soft.github.io/ewol/ewol_coding_style.html)
|
||||||
|
|
32
doxy_audio-orchestra.py
Normal file
32
doxy_audio-orchestra.py
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
import os
|
||||||
|
import doxy.module as module
|
||||||
|
import doxy.debug as debug
|
||||||
|
import doxy.tools as tools
|
||||||
|
|
||||||
|
def create(target, module_name):
|
||||||
|
my_module = module.Module(__file__, module_name)
|
||||||
|
my_module.set_version("version.txt")
|
||||||
|
my_module.set_title("Orchestra: audio interface wrapper")
|
||||||
|
my_module.set_website("http://musicdsp.github.io/" + module_name)
|
||||||
|
my_module.set_website_sources("http://github.com/musicdsp/" + module_name)
|
||||||
|
my_module.add_path([
|
||||||
|
"audio",
|
||||||
|
"doc"
|
||||||
|
])
|
||||||
|
my_module.add_depend([
|
||||||
|
'etk',
|
||||||
|
'audio',
|
||||||
|
])
|
||||||
|
my_module.add_exclude_symbols([
|
||||||
|
'*operator<<*',
|
||||||
|
])
|
||||||
|
my_module.add_exclude_file([
|
||||||
|
'debug.h',
|
||||||
|
])
|
||||||
|
my_module.add_file_patterns([
|
||||||
|
'*.h',
|
||||||
|
'*.md',
|
||||||
|
])
|
||||||
|
|
||||||
|
return my_module
|
@@ -1,5 +1,4 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
import lutin.module as module
|
|
||||||
import lutin.tools as tools
|
import lutin.tools as tools
|
||||||
import lutin.debug as debug
|
import lutin.debug as debug
|
||||||
|
|
||||||
@@ -25,8 +24,7 @@ def get_maintainer():
|
|||||||
def get_version():
|
def get_version():
|
||||||
return "version.txt"
|
return "version.txt"
|
||||||
|
|
||||||
def create(target, module_name):
|
def configure(target, my_module):
|
||||||
my_module = module.Module(__file__, module_name, get_type())
|
|
||||||
my_module.add_src_file([
|
my_module.add_src_file([
|
||||||
'audio/orchestra/debug.cpp',
|
'audio/orchestra/debug.cpp',
|
||||||
'audio/orchestra/status.cpp',
|
'audio/orchestra/status.cpp',
|
||||||
@@ -43,22 +41,25 @@ def create(target, module_name):
|
|||||||
'audio/orchestra/api/Dummy.cpp'
|
'audio/orchestra/api/Dummy.cpp'
|
||||||
])
|
])
|
||||||
my_module.add_header_file([
|
my_module.add_header_file([
|
||||||
'audio/orchestra/debug.h',
|
'audio/orchestra/debug.hpp',
|
||||||
'audio/orchestra/status.h',
|
'audio/orchestra/status.hpp',
|
||||||
'audio/orchestra/type.h',
|
'audio/orchestra/type.hpp',
|
||||||
'audio/orchestra/mode.h',
|
'audio/orchestra/mode.hpp',
|
||||||
'audio/orchestra/state.h',
|
'audio/orchestra/state.hpp',
|
||||||
'audio/orchestra/error.h',
|
'audio/orchestra/error.hpp',
|
||||||
'audio/orchestra/base.h',
|
'audio/orchestra/base.hpp',
|
||||||
'audio/orchestra/Interface.h',
|
'audio/orchestra/Interface.hpp',
|
||||||
'audio/orchestra/Flags.h',
|
'audio/orchestra/Flags.hpp',
|
||||||
'audio/orchestra/Api.h',
|
'audio/orchestra/Api.hpp',
|
||||||
'audio/orchestra/DeviceInfo.h',
|
'audio/orchestra/DeviceInfo.hpp',
|
||||||
'audio/orchestra/StreamOptions.h',
|
'audio/orchestra/StreamOptions.hpp',
|
||||||
'audio/orchestra/CallbackInfo.h',
|
'audio/orchestra/CallbackInfo.hpp',
|
||||||
'audio/orchestra/StreamParameters.h'
|
'audio/orchestra/StreamParameters.hpp'
|
||||||
|
])
|
||||||
|
my_module.add_depend([
|
||||||
|
'audio',
|
||||||
|
'etk'
|
||||||
])
|
])
|
||||||
my_module.add_depend(['audio', 'etk'])
|
|
||||||
# add all the time the dummy interface
|
# add all the time the dummy interface
|
||||||
my_module.add_flag('c++', ['-DORCHESTRA_BUILD_DUMMY'], export=True)
|
my_module.add_flag('c++', ['-DORCHESTRA_BUILD_DUMMY'], export=True)
|
||||||
# TODO : Add a FILE interface:
|
# TODO : Add a FILE interface:
|
||||||
@@ -99,11 +100,11 @@ def create(target, module_name):
|
|||||||
my_module.add_src_file('android/org/musicdsp/orchestra/OrchestraInterfaceInput.java')
|
my_module.add_src_file('android/org/musicdsp/orchestra/OrchestraInterfaceInput.java')
|
||||||
my_module.add_src_file('android/org/musicdsp/orchestra/OrchestraInterfaceOutput.java')
|
my_module.add_src_file('android/org/musicdsp/orchestra/OrchestraInterfaceOutput.java')
|
||||||
my_module.add_src_file('android/org/musicdsp/orchestra/OrchestraManager.java')
|
my_module.add_src_file('android/org/musicdsp/orchestra/OrchestraManager.java')
|
||||||
# create inter language interface
|
# create inter language interfacef
|
||||||
my_module.add_src_file('org.musicdsp.orchestra.OrchestraConstants.javah')
|
my_module.add_src_file('org.musicdsp.orchestra.OrchestraConstants.javah')
|
||||||
my_module.add_path(tools.get_current_path(__file__) + '/android/', type='java')
|
my_module.add_path('android', type='java')
|
||||||
my_module.add_depend(['SDK', 'jvm-basics', 'ejson'])
|
my_module.add_depend(['SDK', 'jvm-basics', 'ejson'])
|
||||||
my_module.add_export_flag('c++', ['-DORCHESTRA_BUILD_JAVA'])
|
my_module.add_flag('c++', ['-DORCHESTRA_BUILD_JAVA'], export=True)
|
||||||
|
|
||||||
my_module.add_src_file('audio/orchestra/api/Android.cpp')
|
my_module.add_src_file('audio/orchestra/api/Android.cpp')
|
||||||
my_module.add_src_file('audio/orchestra/api/AndroidNativeInterface.cpp')
|
my_module.add_src_file('audio/orchestra/api/AndroidNativeInterface.cpp')
|
||||||
@@ -112,9 +113,9 @@ def create(target, module_name):
|
|||||||
else:
|
else:
|
||||||
debug.warning("unknow target for audio_orchestra : " + target.name);
|
debug.warning("unknow target for audio_orchestra : " + target.name);
|
||||||
|
|
||||||
my_module.add_path(tools.get_current_path(__file__))
|
my_module.add_path(".")
|
||||||
|
|
||||||
return my_module
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -124,13 +125,13 @@ def create(target, module_name):
|
|||||||
##
|
##
|
||||||
##################################################################
|
##################################################################
|
||||||
def tool_generate_add_java_section_in_class(target, module, package_name):
|
def tool_generate_add_java_section_in_class(target, module, package_name):
|
||||||
module.pkg_add("GENERATE_SECTION__IMPORT", [
|
module.add_pkg("GENERATE_SECTION__IMPORT", [
|
||||||
"import org.musicdsp.orchestra.OrchestraManager;"
|
"import org.musicdsp.orchestra.OrchestraManager;"
|
||||||
])
|
])
|
||||||
module.pkg_add("GENERATE_SECTION__DECLARE", [
|
module.add_pkg("GENERATE_SECTION__DECLARE", [
|
||||||
"private OrchestraManager m_audioManagerHandle;"
|
"private OrchestraManager m_audioManagerHandle;"
|
||||||
])
|
])
|
||||||
module.pkg_add("GENERATE_SECTION__CONSTRUCTOR", [
|
module.add_pkg("GENERATE_SECTION__CONSTRUCTOR", [
|
||||||
"// load audio maneger if it does not work, it is not critical ...",
|
"// load audio maneger if it does not work, it is not critical ...",
|
||||||
"try {",
|
"try {",
|
||||||
" m_audioManagerHandle = new OrchestraManager();",
|
" m_audioManagerHandle = new OrchestraManager();",
|
||||||
@@ -138,37 +139,37 @@ def tool_generate_add_java_section_in_class(target, module, package_name):
|
|||||||
" Log.e(\"" + package_name + "\", \"Can not load Audio interface (maybe not really needed) :\" + e);",
|
" Log.e(\"" + package_name + "\", \"Can not load Audio interface (maybe not really needed) :\" + e);",
|
||||||
"}"
|
"}"
|
||||||
])
|
])
|
||||||
module.pkg_add("GENERATE_SECTION__ON_CREATE", [
|
module.add_pkg("GENERATE_SECTION__ON_CREATE", [
|
||||||
"if (m_audioManagerHandle != null) {",
|
"if (m_audioManagerHandle != null) {",
|
||||||
" m_audioManagerHandle.onCreate();",
|
" m_audioManagerHandle.onCreate();",
|
||||||
"}"
|
"}"
|
||||||
])
|
])
|
||||||
module.pkg_add("GENERATE_SECTION__ON_START", [
|
module.add_pkg("GENERATE_SECTION__ON_START", [
|
||||||
"if (m_audioManagerHandle != null) {",
|
"if (m_audioManagerHandle != null) {",
|
||||||
" m_audioManagerHandle.onStart();",
|
" m_audioManagerHandle.onStart();",
|
||||||
"}"
|
"}"
|
||||||
])
|
])
|
||||||
module.pkg_add("GENERATE_SECTION__ON_RESTART", [
|
module.add_pkg("GENERATE_SECTION__ON_RESTART", [
|
||||||
"if (m_audioManagerHandle != null) {",
|
"if (m_audioManagerHandle != null) {",
|
||||||
" m_audioManagerHandle.onRestart();",
|
" m_audioManagerHandle.onRestart();",
|
||||||
"}"
|
"}"
|
||||||
])
|
])
|
||||||
module.pkg_add("GENERATE_SECTION__ON_RESUME", [
|
module.add_pkg("GENERATE_SECTION__ON_RESUME", [
|
||||||
"if (m_audioManagerHandle != null) {",
|
"if (m_audioManagerHandle != null) {",
|
||||||
" m_audioManagerHandle.onResume();",
|
" m_audioManagerHandle.onResume();",
|
||||||
"}"
|
"}"
|
||||||
])
|
])
|
||||||
module.pkg_add("GENERATE_SECTION__ON_PAUSE", [
|
module.add_pkg("GENERATE_SECTION__ON_PAUSE", [
|
||||||
"if (m_audioManagerHandle != null) {",
|
"if (m_audioManagerHandle != null) {",
|
||||||
" m_audioManagerHandle.onPause();",
|
" m_audioManagerHandle.onPause();",
|
||||||
"}"
|
"}"
|
||||||
])
|
])
|
||||||
module.pkg_add("GENERATE_SECTION__ON_STOP", [
|
module.add_pkg("GENERATE_SECTION__ON_STOP", [
|
||||||
"if (m_audioManagerHandle != null) {",
|
"if (m_audioManagerHandle != null) {",
|
||||||
" m_audioManagerHandle.onStop();",
|
" m_audioManagerHandle.onStop();",
|
||||||
"}"
|
"}"
|
||||||
])
|
])
|
||||||
module.pkg_add("GENERATE_SECTION__ON_DESTROY", [
|
module.add_pkg("GENERATE_SECTION__ON_DESTROY", [
|
||||||
"// Destroy the AdView.",
|
"// Destroy the AdView.",
|
||||||
"if (m_audioManagerHandle != null) {",
|
"if (m_audioManagerHandle != null) {",
|
||||||
" m_audioManagerHandle.onDestroy();",
|
" m_audioManagerHandle.onDestroy();",
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
import lutin.module as module
|
|
||||||
import lutin.tools as tools
|
|
||||||
import lutin.debug as debug
|
import lutin.debug as debug
|
||||||
|
import lutin.tools as tools
|
||||||
|
|
||||||
|
|
||||||
def get_type():
|
def get_type():
|
||||||
@@ -25,13 +24,14 @@ def get_compagny_name():
|
|||||||
def get_maintainer():
|
def get_maintainer():
|
||||||
return ["Mr DUPIN Edouard <yui.heero@gmail.com>"]
|
return ["Mr DUPIN Edouard <yui.heero@gmail.com>"]
|
||||||
|
|
||||||
def create(target, module_name):
|
def configure(target, my_module):
|
||||||
my_module = module.Module(__file__, module_name, get_type())
|
|
||||||
|
|
||||||
my_module.add_src_file([
|
my_module.add_src_file([
|
||||||
'orchestra-in.cpp'
|
'orchestra-in.cpp'
|
||||||
])
|
])
|
||||||
my_module.add_depend(['audio-orchestra', 'test-debug'])
|
my_module.add_depend([
|
||||||
return my_module
|
'audio-orchestra',
|
||||||
|
'test-debug'
|
||||||
|
])
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
import lutin.module as module
|
|
||||||
import lutin.tools as tools
|
|
||||||
import lutin.debug as debug
|
import lutin.debug as debug
|
||||||
|
import lutin.tools as tools
|
||||||
|
|
||||||
|
|
||||||
def get_type():
|
def get_type():
|
||||||
@@ -25,13 +24,14 @@ def get_compagny_name():
|
|||||||
def get_maintainer():
|
def get_maintainer():
|
||||||
return ["Mr DUPIN Edouard <yui.heero@gmail.com>"]
|
return ["Mr DUPIN Edouard <yui.heero@gmail.com>"]
|
||||||
|
|
||||||
def create(target, module_name):
|
def configure(target, my_module):
|
||||||
my_module = module.Module(__file__, module_name, get_type())
|
|
||||||
|
|
||||||
my_module.add_src_file([
|
my_module.add_src_file([
|
||||||
'orchestra-list.cpp'
|
'orchestra-list.cpp'
|
||||||
])
|
])
|
||||||
my_module.add_depend(['audio-orchestra', 'test-debug'])
|
my_module.add_depend([
|
||||||
return my_module
|
'audio-orchestra',
|
||||||
|
'test-debug'
|
||||||
|
])
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
import lutin.module as module
|
|
||||||
import lutin.tools as tools
|
|
||||||
import lutin.debug as debug
|
import lutin.debug as debug
|
||||||
|
import lutin.tools as tools
|
||||||
|
|
||||||
|
|
||||||
def get_type():
|
def get_type():
|
||||||
@@ -25,13 +24,14 @@ def get_compagny_name():
|
|||||||
def get_maintainer():
|
def get_maintainer():
|
||||||
return ["Mr DUPIN Edouard <yui.heero@gmail.com>"]
|
return ["Mr DUPIN Edouard <yui.heero@gmail.com>"]
|
||||||
|
|
||||||
def create(target, module_name):
|
def configure(target, my_module):
|
||||||
my_module = module.Module(__file__, module_name, get_type())
|
|
||||||
|
|
||||||
my_module.add_src_file([
|
my_module.add_src_file([
|
||||||
'orchestra-out.cpp'
|
'orchestra-out.cpp'
|
||||||
])
|
])
|
||||||
my_module.add_depend(['audio-orchestra', 'test-debug'])
|
my_module.add_depend([
|
||||||
return my_module
|
'audio-orchestra',
|
||||||
|
'test-debug'
|
||||||
|
])
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
@@ -4,10 +4,10 @@
|
|||||||
* @license APACHE v2.0 (see license file)
|
* @license APACHE v2.0 (see license file)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <etk/etk.h>
|
#include <etk/etk.hpp>
|
||||||
#include <test-debug/debug.h>
|
#include <test-debug/debug.hpp>
|
||||||
#include <unistd.h>
|
|
||||||
#include <audio/orchestra/Interface.h>
|
#include <audio/orchestra/Interface.hpp>
|
||||||
|
|
||||||
int main(int _argc, const char **_argv) {
|
int main(int _argc, const char **_argv) {
|
||||||
// the only one init for etk:
|
// the only one init for etk:
|
||||||
|
@@ -4,10 +4,10 @@
|
|||||||
* @license APACHE v2.0 (see license file)
|
* @license APACHE v2.0 (see license file)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <etk/etk.h>
|
#include <etk/etk.hpp>
|
||||||
#include <test-debug/debug.h>
|
#include <test-debug/debug.hpp>
|
||||||
#include <unistd.h>
|
|
||||||
#include <audio/orchestra/Interface.h>
|
#include <audio/orchestra/Interface.hpp>
|
||||||
|
|
||||||
int main(int _argc, const char **_argv) {
|
int main(int _argc, const char **_argv) {
|
||||||
// the only one init for etk:
|
// the only one init for etk:
|
||||||
|
@@ -4,10 +4,10 @@
|
|||||||
* @license APACHE v2.0 (see license file)
|
* @license APACHE v2.0 (see license file)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <etk/etk.h>
|
#include <etk/etk.hpp>
|
||||||
#include <test-debug/debug.h>
|
#include <test-debug/debug.hpp>
|
||||||
#include <unistd.h>
|
|
||||||
#include <audio/orchestra/Interface.h>
|
#include <audio/orchestra/Interface.hpp>
|
||||||
|
|
||||||
int main(int _argc, const char **_argv) {
|
int main(int _argc, const char **_argv) {
|
||||||
// the only one init for etk:
|
// the only one init for etk:
|
||||||
|
@@ -1 +1 @@
|
|||||||
0.3.1
|
0.4.0
|
Reference in New Issue
Block a user