From 678c20170c8b023b7d2e297b3ac436dbdea61e52 Mon Sep 17 00:00:00 2001 From: beveloper Date: Sat, 7 Jun 2003 01:11:51 +0000 Subject: [PATCH] added new mixer components git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3446 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/media/media-add-ons/mixer/Jamfile | 7 ++-- .../media/media-add-ons/mixer/MixerCore.cpp | 38 ++++++++++++++++++ .../media/media-add-ons/mixer/MixerCore.h | 40 +++++++++++++++++++ .../media/media-add-ons/mixer/MixerInput.cpp | 18 +++++++++ .../media/media-add-ons/mixer/MixerInput.h | 18 +++++++++ .../media/media-add-ons/mixer/MixerOutput.cpp | 14 +++++++ .../media/media-add-ons/mixer/MixerOutput.h | 16 ++++++++ 7 files changed, 148 insertions(+), 3 deletions(-) create mode 100644 src/add-ons/media/media-add-ons/mixer/MixerCore.cpp create mode 100644 src/add-ons/media/media-add-ons/mixer/MixerCore.h create mode 100644 src/add-ons/media/media-add-ons/mixer/MixerInput.cpp create mode 100644 src/add-ons/media/media-add-ons/mixer/MixerInput.h create mode 100644 src/add-ons/media/media-add-ons/mixer/MixerOutput.cpp create mode 100644 src/add-ons/media/media-add-ons/mixer/MixerOutput.h diff --git a/src/add-ons/media/media-add-ons/mixer/Jamfile b/src/add-ons/media/media-add-ons/mixer/Jamfile index 8f4f775778..853f5e21d7 100644 --- a/src/add-ons/media/media-add-ons/mixer/Jamfile +++ b/src/add-ons/media/media-add-ons/mixer/Jamfile @@ -1,11 +1,12 @@ SubDir OBOS_TOP src add-ons media media-add-ons mixer ; -UsePrivateHeaders media ; - Addon mixer.media_addon : media : AudioMixer.cpp - MixerAddOn.cpp FillMixBuffer.cpp + MixerAddOn.cpp + MixerCore.cpp + MixerInput.cpp + MixerOutput.cpp Resampler.cpp ; diff --git a/src/add-ons/media/media-add-ons/mixer/MixerCore.cpp b/src/add-ons/media/media-add-ons/mixer/MixerCore.cpp new file mode 100644 index 0000000000..d91d999e48 --- /dev/null +++ b/src/add-ons/media/media-add-ons/mixer/MixerCore.cpp @@ -0,0 +1,38 @@ +#include +#include "MixerCore.h" +#include "MixerInput.h" +#include "MixerOutput.h" + +MixerCore::MixerCore() + : fLocker(new BLocker) +{ +} + +MixerCore::~MixerCore() +{ + delete fLocker; +} + +bool +MixerCore::AddInput(const media_input &input) +{ + return true; +} + +bool +MixerCore::AddOutput(const media_output &output) +{ + return true; +} + +bool +MixerCore::RemoveInput(const media_input &input) +{ + return true; +} + +bool +MixerCore::RemoveOutput(const media_output &output) +{ + return true; +} diff --git a/src/add-ons/media/media-add-ons/mixer/MixerCore.h b/src/add-ons/media/media-add-ons/mixer/MixerCore.h new file mode 100644 index 0000000000..1d15581e1f --- /dev/null +++ b/src/add-ons/media/media-add-ons/mixer/MixerCore.h @@ -0,0 +1,40 @@ +#ifndef _MIXER_CORE_H +#define _MIXER_CORE_H + +#include + +class MixerInput; +class MixerOutput; + + +class MixerCore +{ +public: + MixerCore(); + ~MixerCore(); + + bool AddInput(const media_input &input); + bool AddOutput(const media_output &output); + bool RemoveInput(const media_input &input); + bool RemoveOutput(const media_output &output); + + void Lock(); + void Unlock(); + +private: + BLocker *fLocker; +}; + + +inline void MixerCore::Lock() +{ + fLocker->Lock(); +} + +inline void MixerCore::Unlock() +{ + fLocker->Unlock(); +} + +#endif + diff --git a/src/add-ons/media/media-add-ons/mixer/MixerInput.cpp b/src/add-ons/media/media-add-ons/mixer/MixerInput.cpp new file mode 100644 index 0000000000..4dd176a48d --- /dev/null +++ b/src/add-ons/media/media-add-ons/mixer/MixerInput.cpp @@ -0,0 +1,18 @@ +#include +#include "MixerInput.h" +#include "MixerCore.h" + + +MixerInput::MixerInput(MixerCore *core) + : fCore(core) +{ +} + +MixerInput::~MixerInput() +{ +} + +void +MixerInput::BufferReceived(BBuffer *buffer) +{ +} diff --git a/src/add-ons/media/media-add-ons/mixer/MixerInput.h b/src/add-ons/media/media-add-ons/mixer/MixerInput.h new file mode 100644 index 0000000000..9ab143ca68 --- /dev/null +++ b/src/add-ons/media/media-add-ons/mixer/MixerInput.h @@ -0,0 +1,18 @@ +#ifndef _MIXER_INPUT_H +#define _MIXER_INPUT_H + +class MixerCore; + +class MixerInput +{ +public: + MixerInput(MixerCore *core); + ~MixerInput(); + + void BufferReceived(BBuffer *buffer); + +private: + MixerCore *fCore; +}; + +#endif diff --git a/src/add-ons/media/media-add-ons/mixer/MixerOutput.cpp b/src/add-ons/media/media-add-ons/mixer/MixerOutput.cpp new file mode 100644 index 0000000000..96c4f1a654 --- /dev/null +++ b/src/add-ons/media/media-add-ons/mixer/MixerOutput.cpp @@ -0,0 +1,14 @@ +#include +#include "MixerOutput.h" +#include "MixerCore.h" + + +MixerOutput::MixerOutput(MixerCore *core) + : fCore(core) +{ +} + +MixerOutput::~MixerOutput() +{ +} + diff --git a/src/add-ons/media/media-add-ons/mixer/MixerOutput.h b/src/add-ons/media/media-add-ons/mixer/MixerOutput.h new file mode 100644 index 0000000000..a1963ec4cd --- /dev/null +++ b/src/add-ons/media/media-add-ons/mixer/MixerOutput.h @@ -0,0 +1,16 @@ +#ifndef _MIXER_OUTPUT_H +#define _MIXER_OUTPUT_H + +class MixerCore; + +class MixerOutput +{ +public: + MixerOutput(MixerCore *core); + ~MixerOutput(); + +private: + MixerCore *fCore; +}; + +#endif