* Added Flanger and AudioAdapter audio addons from Cortex to the build
* Actually I could only try if they build and work inside the vm, I do not have sound available somewhere, so could please someone test whether the results are reasonable? They cannot be added to the image until someone approves that they are working fine... * got rid of most compiler warnings git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24636 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
f9fd198ee3
commit
083b91d4ba
@ -16,3 +16,5 @@ SubInclude HAIKU_TOP src apps cortex TipManager ;
|
||||
SubInclude HAIKU_TOP src apps cortex TransportView ;
|
||||
SubInclude HAIKU_TOP src apps cortex ValControl ;
|
||||
SubInclude HAIKU_TOP src apps cortex support ;
|
||||
|
||||
SubInclude HAIKU_TOP src apps cortex addons ;
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include <ParameterWeb.h>
|
||||
|
||||
status_t
|
||||
_AudioAdapterParams::store(parameterID, const void* data, size_t size)
|
||||
_AudioAdapterParams::store(int32 parameterID, const void* data, size_t size)
|
||||
{
|
||||
if (size < sizeof(int32))
|
||||
return B_NO_MEMORY;
|
||||
|
25
src/apps/cortex/addons/AudioAdapter/Jamfile
Normal file
25
src/apps/cortex/addons/AudioAdapter/Jamfile
Normal file
@ -0,0 +1,25 @@
|
||||
SubDir HAIKU_TOP src apps cortex addons AudioAdapter ;
|
||||
|
||||
SubDirHdrs [ FDirName $(HAIKU_TOP) src apps cortex addons common ] ;
|
||||
SubDirHdrs [ FDirName $(HAIKU_TOP) src apps cortex addons audioOps ] ;
|
||||
|
||||
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src apps cortex addons common ] ;
|
||||
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src apps cortex addons audioOps ] ;
|
||||
|
||||
Addon cortex_audioadapter.media_addon :
|
||||
AudioAdapterAddOn.cpp
|
||||
AudioAdapterNode.cpp
|
||||
AudioAdapterParams.cpp
|
||||
|
||||
# audioOps/
|
||||
AudioAdapterOp.cpp
|
||||
|
||||
# common/
|
||||
AudioBuffer.cpp
|
||||
AudioFilterNode.cpp
|
||||
IParameterSet.cpp
|
||||
RawBuffer.cpp
|
||||
SoundUtils.cpp
|
||||
|
||||
: be media
|
||||
;
|
@ -1449,7 +1449,7 @@ void FlangerNode::filterBuffer(
|
||||
if(readFrameLo != (int32)fReadFrame) {
|
||||
|
||||
// interpolate (A)
|
||||
int32 readFrameHi = (int32)ceil(fReadFrame);
|
||||
uint32 readFrameHi = (int32)ceil(fReadFrame);
|
||||
delayedFrame.channel[0] *= ((float)readFrameHi - fReadFrame);
|
||||
if(stereo)
|
||||
delayedFrame.channel[1] *= ((float)readFrameHi - fReadFrame);
|
||||
|
15
src/apps/cortex/addons/Flanger/Jamfile
Normal file
15
src/apps/cortex/addons/Flanger/Jamfile
Normal file
@ -0,0 +1,15 @@
|
||||
SubDir HAIKU_TOP src apps cortex addons Flanger ;
|
||||
|
||||
SubDirHdrs [ FDirName $(HAIKU_TOP) src apps cortex addons common ] ;
|
||||
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src apps cortex addons common ] ;
|
||||
Addon cortex_flanger.media_addon :
|
||||
FlangerApp.cpp
|
||||
FlangerAddOn.cpp
|
||||
FlangerNode.cpp
|
||||
AudioBuffer.cpp
|
||||
MediaNodeControlApp.cpp
|
||||
RawBuffer.cpp
|
||||
SoundUtils.cpp
|
||||
: be media
|
||||
: Resource.rsrc
|
||||
;
|
7
src/apps/cortex/addons/Jamfile
Normal file
7
src/apps/cortex/addons/Jamfile
Normal file
@ -0,0 +1,7 @@
|
||||
SubDir HAIKU_TOP src apps cortex addons ;
|
||||
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
|
||||
SubInclude HAIKU_TOP src apps cortex addons AudioAdapter ;
|
||||
SubInclude HAIKU_TOP src apps cortex addons Flanger ;
|
||||
|
@ -279,7 +279,7 @@ uint32 AudioBuffer::findMin(uint32 fromFrame, uint32 frameCount,
|
||||
n = 0;
|
||||
}
|
||||
|
||||
float fCur;
|
||||
float fCur = 0;
|
||||
convert_sample(pCur, fCur, m_format.format);
|
||||
|
||||
if(fCur < pMin[n % channels]) {
|
||||
@ -332,7 +332,7 @@ uint32 AudioBuffer::findMax(uint32 fromFrame, uint32 frameCount,
|
||||
n = 0;
|
||||
}
|
||||
|
||||
float fCur;
|
||||
float fCur = 0;
|
||||
convert_sample(pCur, fCur, m_format.format);
|
||||
|
||||
if(fCur > pMax[n % channels]) {
|
||||
@ -384,7 +384,7 @@ uint32 AudioBuffer::findPeaks(uint32 fromFrame, uint32 frameCount,
|
||||
n = 0;
|
||||
}
|
||||
|
||||
float fCur;
|
||||
float fCur = 0;
|
||||
convert_sample(pCur, fCur, m_format.format);
|
||||
|
||||
if(fabs(fCur) > pPeaks[n % channels]) {
|
||||
@ -437,7 +437,7 @@ uint32 AudioBuffer::average(uint32 fromFrame, uint32 frameCount,
|
||||
n = 0;
|
||||
}
|
||||
|
||||
float fCur;
|
||||
float fCur = 0;
|
||||
convert_sample(pCur, fCur, m_format.format);
|
||||
|
||||
pAverage[n%channels] += fCur;
|
||||
|
@ -595,7 +595,10 @@ void AudioFilterNode::Disconnected(
|
||||
// mark disconnected
|
||||
m_input.source = media_source::null;
|
||||
|
||||
status_t err = getRequiredInputFormat(m_input.format);
|
||||
#ifdef DEBUG
|
||||
status_t err =
|
||||
#endif
|
||||
getRequiredInputFormat(m_input.format);
|
||||
ASSERT(err == B_OK);
|
||||
|
||||
// remove operation
|
||||
@ -823,7 +826,10 @@ void AudioFilterNode::Disconnect(
|
||||
// clean up
|
||||
m_output.destination = media_destination::null;
|
||||
|
||||
status_t err = getRequiredOutputFormat(m_output.format);
|
||||
#ifdef DEBUG
|
||||
status_t err =
|
||||
#endif
|
||||
getRequiredOutputFormat(m_output.format);
|
||||
ASSERT(err == B_OK);
|
||||
|
||||
updateBufferGroup();
|
||||
|
@ -105,7 +105,10 @@ public: // *** HOOKS
|
||||
|
||||
media_format preferred;
|
||||
preferred.type = B_MEDIA_RAW_AUDIO;
|
||||
status_t err = getPreferredInputFormat(preferred);
|
||||
#ifdef DEBUG
|
||||
status_t err =
|
||||
#endif
|
||||
getPreferredInputFormat(preferred);
|
||||
ASSERT(err == B_OK);
|
||||
_specialize_raw_audio_format(preferred, ioFormat);
|
||||
}
|
||||
@ -121,7 +124,10 @@ public: // *** HOOKS
|
||||
|
||||
media_format preferred;
|
||||
preferred.type = B_MEDIA_RAW_AUDIO;
|
||||
status_t err = getPreferredOutputFormat(preferred);
|
||||
#ifdef DEBUG
|
||||
status_t err =
|
||||
#endif
|
||||
getPreferredOutputFormat(preferred);
|
||||
ASSERT(err == B_OK);
|
||||
|
||||
string_for_format(preferred, fmt_buffer, 255);
|
||||
|
@ -11,6 +11,7 @@ class IParameterSet;
|
||||
|
||||
class IAudioOpHost {
|
||||
public: // *** REQUIRED INTERFACE
|
||||
virtual ~IAudioOpHost() { }
|
||||
virtual IParameterSet* parameterSet() const =0;
|
||||
};
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
#ifndef __IParameterSet_H__
|
||||
#define __IParameterSet_H__
|
||||
|
||||
#include <ParameterWeb.h>
|
||||
#include <SupportDefs.h>
|
||||
|
||||
class IParameterSet {
|
||||
|
@ -19,12 +19,13 @@ RawBuffer::RawBuffer(
|
||||
rtm_pool* pFromPool) :
|
||||
|
||||
m_pData(0),
|
||||
m_allocatedSize(0),
|
||||
m_pPool(pFromPool),
|
||||
m_frameSize(frameSize),
|
||||
m_frames(frames),
|
||||
m_allocatedSize(0),
|
||||
m_bCircular(bCircular),
|
||||
m_bOwnData(true),
|
||||
m_pPool(pFromPool) {
|
||||
m_bOwnData(true)
|
||||
{
|
||||
|
||||
if(m_frames)
|
||||
resize(m_frames);
|
||||
@ -40,12 +41,13 @@ RawBuffer::RawBuffer(
|
||||
rtm_pool* pFromPool) :
|
||||
|
||||
m_pData(pData),
|
||||
m_allocatedSize(0),
|
||||
m_pPool(pFromPool),
|
||||
m_frameSize(frameSize),
|
||||
m_frames(frames),
|
||||
m_bOwnData(false),
|
||||
m_allocatedSize(0),
|
||||
m_bCircular(bCircular),
|
||||
m_pPool(pFromPool) {}
|
||||
m_bOwnData(false)
|
||||
{}
|
||||
|
||||
RawBuffer::RawBuffer(const RawBuffer& clone) {
|
||||
operator=(clone);
|
||||
|
@ -136,7 +136,7 @@ inline void convert_sample(void* pIn, void* pOut,
|
||||
|
||||
else {
|
||||
// two-step cases
|
||||
float fTemp;
|
||||
float fTemp = 0;
|
||||
convert_sample(pIn, fTemp, in_audio_format);
|
||||
convert_sample(fTemp, pOut, out_audio_format);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user