added new mixer components
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3446 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
2eb7012d8e
commit
678c20170c
@ -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
|
||||
;
|
||||
|
||||
|
38
src/add-ons/media/media-add-ons/mixer/MixerCore.cpp
Normal file
38
src/add-ons/media/media-add-ons/mixer/MixerCore.cpp
Normal file
@ -0,0 +1,38 @@
|
||||
#include <MediaNode.h>
|
||||
#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;
|
||||
}
|
40
src/add-ons/media/media-add-ons/mixer/MixerCore.h
Normal file
40
src/add-ons/media/media-add-ons/mixer/MixerCore.h
Normal file
@ -0,0 +1,40 @@
|
||||
#ifndef _MIXER_CORE_H
|
||||
#define _MIXER_CORE_H
|
||||
|
||||
#include <Locker.h>
|
||||
|
||||
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
|
||||
|
18
src/add-ons/media/media-add-ons/mixer/MixerInput.cpp
Normal file
18
src/add-ons/media/media-add-ons/mixer/MixerInput.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
#include <MediaNode.h>
|
||||
#include "MixerInput.h"
|
||||
#include "MixerCore.h"
|
||||
|
||||
|
||||
MixerInput::MixerInput(MixerCore *core)
|
||||
: fCore(core)
|
||||
{
|
||||
}
|
||||
|
||||
MixerInput::~MixerInput()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
MixerInput::BufferReceived(BBuffer *buffer)
|
||||
{
|
||||
}
|
18
src/add-ons/media/media-add-ons/mixer/MixerInput.h
Normal file
18
src/add-ons/media/media-add-ons/mixer/MixerInput.h
Normal file
@ -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
|
14
src/add-ons/media/media-add-ons/mixer/MixerOutput.cpp
Normal file
14
src/add-ons/media/media-add-ons/mixer/MixerOutput.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include <MediaNode.h>
|
||||
#include "MixerOutput.h"
|
||||
#include "MixerCore.h"
|
||||
|
||||
|
||||
MixerOutput::MixerOutput(MixerCore *core)
|
||||
: fCore(core)
|
||||
{
|
||||
}
|
||||
|
||||
MixerOutput::~MixerOutput()
|
||||
{
|
||||
}
|
||||
|
16
src/add-ons/media/media-add-ons/mixer/MixerOutput.h
Normal file
16
src/add-ons/media/media-add-ons/mixer/MixerOutput.h
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user