You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Removed juce files to their own library
This commit is contained in:
@@ -1,4 +1,2 @@
|
||||
build/
|
||||
build/*
|
||||
src/juce/Builds/
|
||||
src/juce/Builds/*
|
||||
|
||||
@@ -20,14 +20,12 @@
|
||||
<folderInfo id="0.458309483." name="/" resourcePath="">
|
||||
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.860793860" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
|
||||
<targetPlatform binaryParser="org.eclipse.cdt.core.MachO64" id="org.eclipse.cdt.build.core.prefbase.toolchain.860793860.1850291254" name=""/>
|
||||
<builder arguments="" buildPath="${workspace_loc:/OpenShotLibrary/build}" command="make" id="org.eclipse.cdt.build.core.settings.default.builder.1861063610" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
|
||||
<builder arguments="" buildPath="${workspace_loc:/libopenshot/build}" command="make" id="org.eclipse.cdt.build.core.settings.default.builder.1861063610" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.1656184502" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs">
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.libpaths.140246732" name="Library Paths" superClass="org.eclipse.cdt.build.core.settings.holder.libpaths"/>
|
||||
</tool>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.1015291342" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1997837481" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="/usr/include/ImageMagick"/>
|
||||
</option>
|
||||
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1997837481" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath"/>
|
||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.676494018" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||
</tool>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.458268777" name="UPC" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||
@@ -42,6 +40,7 @@
|
||||
<listOptionValue builtIn="false" value="/usr/include/unittest++"/>
|
||||
<listOptionValue builtIn="false" value="/usr/local/include/juce"/>
|
||||
<listOptionValue builtIn="false" value="/usr/include/SDL"/>
|
||||
<listOptionValue builtIn="false" value="/usr/local/include/libopenshot-audio"/>
|
||||
</option>
|
||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1807071462" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||
</tool>
|
||||
@@ -322,7 +321,7 @@
|
||||
<folderInfo id="0.458309483.953603139." name="/" resourcePath="">
|
||||
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.2126614311" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
|
||||
<targetPlatform binaryParser="org.eclipse.cdt.core.MachO64" id="org.eclipse.cdt.build.core.prefbase.toolchain.2126614311.1786856669" name=""/>
|
||||
<builder arguments="" buildPath="${workspace_loc:/OpenShotLibrary/build}" command="make" id="org.eclipse.cdt.build.core.settings.default.builder.1065130298" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
|
||||
<builder arguments="" buildPath="${workspace_loc:/libopenshot/build}" command="make" id="org.eclipse.cdt.build.core.settings.default.builder.1065130298" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.1171217169" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
|
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.1436671119" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.189113030" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||
|
||||
5
.project
5
.project
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>OpenShotLibrary</name>
|
||||
<name>libopenshot</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
@@ -36,7 +36,7 @@
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildLocation</key>
|
||||
<value>${workspace_loc:/OpenShotLibrary/build}</value>
|
||||
<value>${workspace_loc:/libopenshot/build}</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
|
||||
@@ -83,6 +83,5 @@
|
||||
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
<nature>org.python.pydev.pythonNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?eclipse-pydev version="1.0"?>
|
||||
|
||||
<pydev_project>
|
||||
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
|
||||
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.6</pydev_property>
|
||||
</pydev_project>
|
||||
42
README
42
README
@@ -1,5 +1,5 @@
|
||||
OpenShot Video Library is a program that creates, modifies, and edits video files.
|
||||
Copyright (C) 2011 Jonathan Thomas
|
||||
Copyright (C) 2011 OpenShot Studios, LLC
|
||||
|
||||
OpenShot Video Editor is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -21,43 +21,3 @@ along with OpenShot Video Editor. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Please see /doc/InstallationGuide.pdf for a very detailed
|
||||
Linux and Windows compiling instruction guide.
|
||||
|
||||
|
||||
|
||||
#################
|
||||
WEBSITES
|
||||
#################
|
||||
|
||||
http://www.openshotvideo.com/ (PROJECT WEBSITE and BLOG)
|
||||
http://launchpad.net/openshot/ (SOURCE CODE, BUG TRACKER, TRANSLATIONS)
|
||||
http://freshmeat.net/projects/openshot-video-editor/
|
||||
https://sourceforge.net/projects/openshotvideo/
|
||||
https://www.ohloh.net/p/openshot-video-editor/
|
||||
|
||||
|
||||
|
||||
####################
|
||||
REPORT A BUG
|
||||
####################
|
||||
|
||||
https://bugs.launchpad.net/openshot
|
||||
|
||||
|
||||
|
||||
####################
|
||||
TRANSLATIONS
|
||||
####################
|
||||
|
||||
https://translations.launchpad.net/openshot
|
||||
|
||||
|
||||
|
||||
####################
|
||||
ASK A QUESTION
|
||||
####################
|
||||
|
||||
https://answers.launchpad.net/openshot
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
# - Try to find JUCE Audio Libraries
|
||||
# libjuce;
|
||||
# - Try to find JUCE-based OpenShot Audio Library
|
||||
# libopenshot-audio;
|
||||
# Once done this will define
|
||||
# LIBJUCE_FOUND - System has libjuce.so
|
||||
# LIBJUCE_INCLUDE_DIRS - The juce.h include directories
|
||||
# LIBJUCE_LIBRARIES - The libraries needed to use juce
|
||||
|
||||
# Find the base directory of juce includes
|
||||
find_path(LIBJUCE_BASE_DIR juce_amalgamated.h
|
||||
PATHS /usr/include/juce/
|
||||
/usr/local/include/juce/
|
||||
$ENV{JUCE_DIR}/include/juce/
|
||||
$ENV{JUCE_DIR}/includes/juce/ )
|
||||
find_path(LIBJUCE_BASE_DIR JuceHeader.h
|
||||
PATHS /usr/include/libopenshot-audio/
|
||||
/usr/local/include/libopenshot-audio/
|
||||
$ENV{JUCE_DIR}/include/libopenshot-audio/
|
||||
$ENV{JUCE_DIR}/includes/libopenshot-audio/ )
|
||||
|
||||
# Get a list of all header file paths
|
||||
FILE(GLOB_RECURSE JUCE_HEADER_FILES
|
||||
@@ -31,25 +31,21 @@ ENDFOREACH(HEADER_PATH)
|
||||
# Remove duplicates from the header directories list
|
||||
LIST(REMOVE_DUPLICATES HEADER_DIRECTORIES)
|
||||
|
||||
# Find the juce.so / juce.dll library
|
||||
# Find the libopenshot-audio.so / libopenshot-audio.dll library
|
||||
find_library(LIBJUCE_LIBRARY
|
||||
NAMES libjuce juce
|
||||
NAMES libopenshot-audio openshot-audio
|
||||
HINTS /usr/lib/
|
||||
/usr/lib/juce/
|
||||
/usr/lib/libopenshot-audio/
|
||||
/usr/local/lib/
|
||||
$ENV{JUCE_DIR}/lib/ )
|
||||
|
||||
set(LIBJUCE_LIBRARIES ${LIBJUCE_LIBRARY})
|
||||
set(LIBJUCE_LIBRARY ${LIBJUCE_LIBRARIES})
|
||||
#set(LIBJUCE_INCLUDE_DIR ${HEADER_DIRECTORIES} )
|
||||
#set(LIBJUCE_INCLUDE_DIRS ${LIBJUCE_INCLUDE_DIR} )
|
||||
|
||||
# Seems to work fine with just the base dir (rather than all the actual include folders)
|
||||
set(LIBJUCE_INCLUDE_DIR ${LIBJUCE_BASE_DIR} )
|
||||
set(LIBJUCE_INCLUDE_DIRS ${LIBJUCE_BASE_DIR} )
|
||||
|
||||
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set LIBJUCE_FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#define __JUCE_UNITTEST_JUCEHEADER__
|
||||
|
||||
#include <iomanip>
|
||||
#include "juce.h"
|
||||
#include "JuceLibraryCode/JuceHeader.h
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
@@ -1,158 +0,0 @@
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
There's a section below where you can add your own custom code safely, and the
|
||||
Introjucer will preserve the contents of that block, but the best way to change
|
||||
any of these definitions is by using the Introjucer's project settings.
|
||||
|
||||
Any commented-out settings will assume their default values.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __JUCE_APPCONFIG_IIUU5J__
|
||||
#define __JUCE_APPCONFIG_IIUU5J__
|
||||
|
||||
//==============================================================================
|
||||
// [BEGIN_USER_CODE_SECTION]
|
||||
|
||||
// (You can add your own code in this section, and the Introjucer will not overwrite it)
|
||||
|
||||
// [END_USER_CODE_SECTION]
|
||||
|
||||
//==============================================================================
|
||||
#define JUCE_MODULE_AVAILABLE_juce_audio_basics 1
|
||||
#define JUCE_MODULE_AVAILABLE_juce_audio_devices 1
|
||||
#define JUCE_MODULE_AVAILABLE_juce_audio_formats 1
|
||||
#define JUCE_MODULE_AVAILABLE_juce_audio_processors 1
|
||||
#define JUCE_MODULE_AVAILABLE_juce_core 1
|
||||
#define JUCE_MODULE_AVAILABLE_juce_data_structures 1
|
||||
#define JUCE_MODULE_AVAILABLE_juce_events 1
|
||||
#define JUCE_MODULE_AVAILABLE_juce_graphics 1
|
||||
#define JUCE_MODULE_AVAILABLE_juce_gui_basics 1
|
||||
#define JUCE_MODULE_AVAILABLE_juce_gui_extra 1
|
||||
|
||||
//==============================================================================
|
||||
// juce_audio_devices flags:
|
||||
|
||||
#ifndef JUCE_ASIO
|
||||
//#define JUCE_ASIO
|
||||
#endif
|
||||
|
||||
#ifndef JUCE_WASAPI
|
||||
//#define JUCE_WASAPI
|
||||
#endif
|
||||
|
||||
#ifndef JUCE_DIRECTSOUND
|
||||
//#define JUCE_DIRECTSOUND
|
||||
#endif
|
||||
|
||||
#ifndef JUCE_ALSA
|
||||
//#define JUCE_ALSA
|
||||
#endif
|
||||
|
||||
#ifndef JUCE_JACK
|
||||
//#define JUCE_JACK
|
||||
#endif
|
||||
|
||||
#ifndef JUCE_USE_ANDROID_OPENSLES
|
||||
//#define JUCE_USE_ANDROID_OPENSLES
|
||||
#endif
|
||||
|
||||
#ifndef JUCE_USE_CDREADER
|
||||
//#define JUCE_USE_CDREADER
|
||||
#endif
|
||||
|
||||
#ifndef JUCE_USE_CDBURNER
|
||||
//#define JUCE_USE_CDBURNER
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
// juce_audio_formats flags:
|
||||
|
||||
#ifndef JUCE_USE_FLAC
|
||||
#define JUCE_USE_FLAC 0
|
||||
#endif
|
||||
|
||||
#ifndef JUCE_USE_OGGVORBIS
|
||||
#define JUCE_USE_OGGVORBIS 0
|
||||
#endif
|
||||
|
||||
#ifndef JUCE_USE_MP3AUDIOFORMAT
|
||||
#define JUCE_USE_MP3AUDIOFORMAT 0
|
||||
#endif
|
||||
|
||||
#ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT
|
||||
#define JUCE_USE_WINDOWS_MEDIA_FORMAT 0
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
// juce_audio_processors flags:
|
||||
|
||||
#ifndef JUCE_PLUGINHOST_VST
|
||||
//#define JUCE_PLUGINHOST_VST
|
||||
#endif
|
||||
|
||||
#ifndef JUCE_PLUGINHOST_AU
|
||||
//#define JUCE_PLUGINHOST_AU
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
// juce_core flags:
|
||||
|
||||
#ifndef JUCE_FORCE_DEBUG
|
||||
//#define JUCE_FORCE_DEBUG
|
||||
#endif
|
||||
|
||||
#ifndef JUCE_LOG_ASSERTIONS
|
||||
//#define JUCE_LOG_ASSERTIONS
|
||||
#endif
|
||||
|
||||
#ifndef JUCE_CHECK_MEMORY_LEAKS
|
||||
//#define JUCE_CHECK_MEMORY_LEAKS
|
||||
#endif
|
||||
|
||||
#ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
|
||||
//#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
// juce_graphics flags:
|
||||
|
||||
#ifndef JUCE_USE_COREIMAGE_LOADER
|
||||
#define JUCE_USE_COREIMAGE_LOADER 0
|
||||
#endif
|
||||
|
||||
#ifndef JUCE_USE_DIRECTWRITE
|
||||
#define JUCE_USE_DIRECTWRITE 0
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
// juce_gui_basics flags:
|
||||
|
||||
#ifndef JUCE_ENABLE_REPAINT_DEBUGGING
|
||||
//#define JUCE_ENABLE_REPAINT_DEBUGGING
|
||||
#endif
|
||||
|
||||
#ifndef JUCE_USE_XSHM
|
||||
//#define JUCE_USE_XSHM
|
||||
#endif
|
||||
|
||||
#ifndef JUCE_USE_XRENDER
|
||||
//#define JUCE_USE_XRENDER
|
||||
#endif
|
||||
|
||||
#ifndef JUCE_USE_XCURSOR
|
||||
//#define JUCE_USE_XCURSOR
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
// juce_gui_extra flags:
|
||||
|
||||
#ifndef JUCE_WEB_BROWSER
|
||||
#define JUCE_WEB_BROWSER 0
|
||||
#endif
|
||||
|
||||
|
||||
#endif // __JUCE_APPCONFIG_IIUU5J__
|
||||
@@ -1,41 +0,0 @@
|
||||
/*
|
||||
|
||||
IMPORTANT! This file is auto-generated each time you save your
|
||||
project - if you alter its contents, your changes may be overwritten!
|
||||
|
||||
This is the header file that your files should include in order to get all the
|
||||
JUCE library headers. You should avoid including the JUCE headers directly in
|
||||
your own source files, because that wouldn't pick up the correct configuration
|
||||
options for your app.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __APPHEADERFILE_IIUU5J__
|
||||
#define __APPHEADERFILE_IIUU5J__
|
||||
|
||||
#include "AppConfig.h"
|
||||
#include "modules/juce_audio_basics/juce_audio_basics.h"
|
||||
#include "modules/juce_audio_devices/juce_audio_devices.h"
|
||||
#include "modules/juce_audio_formats/juce_audio_formats.h"
|
||||
#include "modules/juce_audio_processors/juce_audio_processors.h"
|
||||
#include "modules/juce_core/juce_core.h"
|
||||
#include "modules/juce_data_structures/juce_data_structures.h"
|
||||
#include "modules/juce_events/juce_events.h"
|
||||
#include "modules/juce_graphics/juce_graphics.h"
|
||||
#include "modules/juce_gui_basics/juce_gui_basics.h"
|
||||
#include "modules/juce_gui_extra/juce_gui_extra.h"
|
||||
|
||||
#if ! DONT_SET_USING_JUCE_NAMESPACE
|
||||
// If your code uses a lot of JUCE classes, then this will obviously save you
|
||||
// a lot of typing, but can be disabled by setting DONT_SET_USING_JUCE_NAMESPACE.
|
||||
using namespace juce;
|
||||
#endif
|
||||
|
||||
namespace ProjectInfo
|
||||
{
|
||||
const char* const projectName = "OpenShotLibrary";
|
||||
const char* const versionString = "1.0.0";
|
||||
const int versionNumber = 0x10000;
|
||||
}
|
||||
|
||||
#endif // __APPHEADERFILE_IIUU5J__
|
||||
@@ -1,12 +0,0 @@
|
||||
|
||||
Important Note!!
|
||||
================
|
||||
|
||||
The purpose of this folder is to contain files that are auto-generated by the Introjucer,
|
||||
and ALL files in this folder will be mercilessly DELETED and completely re-written whenever
|
||||
the Introjucer saves your project.
|
||||
|
||||
Therefore, it's a bad idea to make any manual changes to the files in here, or to
|
||||
put any of your own files in here if you don't want to lose them. (Of course you may choose
|
||||
to add the folder's contents to your version-control system so that you can re-merge your own
|
||||
modifications after the Introjucer has saved its changes).
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,430 +0,0 @@
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE library - "Jules' Utility Class Extensions"
|
||||
Copyright 2004-11 by Raw Material Software Ltd.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
JUCE can be redistributed and/or modified under the terms of the GNU General
|
||||
Public License (Version 2), as published by the Free Software Foundation.
|
||||
A copy of the license is included in the JUCE distribution, or can be found
|
||||
online at www.gnu.org/licenses.
|
||||
|
||||
JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
To release a closed-source product which uses JUCE, commercial licenses are
|
||||
available: visit www.rawmaterialsoftware.com/juce for more information.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#ifndef __JUCE_AUDIOSAMPLEBUFFER_JUCEHEADER__
|
||||
#define __JUCE_AUDIOSAMPLEBUFFER_JUCEHEADER__
|
||||
|
||||
|
||||
//==============================================================================
|
||||
/**
|
||||
A multi-channel buffer of 32-bit floating point audio samples.
|
||||
|
||||
*/
|
||||
class JUCE_API AudioSampleBuffer
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
/** Creates a buffer with a specified number of channels and samples.
|
||||
|
||||
The contents of the buffer will initially be undefined, so use clear() to
|
||||
set all the samples to zero.
|
||||
|
||||
The buffer will allocate its memory internally, and this will be released
|
||||
when the buffer is deleted. If the memory can't be allocated, this will
|
||||
throw a std::bad_alloc exception.
|
||||
*/
|
||||
AudioSampleBuffer (int numChannels,
|
||||
int numSamples) noexcept;
|
||||
|
||||
/** Creates a buffer using a pre-allocated block of memory.
|
||||
|
||||
Note that if the buffer is resized or its number of channels is changed, it
|
||||
will re-allocate memory internally and copy the existing data to this new area,
|
||||
so it will then stop directly addressing this memory.
|
||||
|
||||
@param dataToReferTo a pre-allocated array containing pointers to the data
|
||||
for each channel that should be used by this buffer. The
|
||||
buffer will only refer to this memory, it won't try to delete
|
||||
it when the buffer is deleted or resized.
|
||||
@param numChannels the number of channels to use - this must correspond to the
|
||||
number of elements in the array passed in
|
||||
@param numSamples the number of samples to use - this must correspond to the
|
||||
size of the arrays passed in
|
||||
*/
|
||||
AudioSampleBuffer (float** dataToReferTo,
|
||||
int numChannels,
|
||||
int numSamples) noexcept;
|
||||
|
||||
/** Creates a buffer using a pre-allocated block of memory.
|
||||
|
||||
Note that if the buffer is resized or its number of channels is changed, it
|
||||
will re-allocate memory internally and copy the existing data to this new area,
|
||||
so it will then stop directly addressing this memory.
|
||||
|
||||
@param dataToReferTo a pre-allocated array containing pointers to the data
|
||||
for each channel that should be used by this buffer. The
|
||||
buffer will only refer to this memory, it won't try to delete
|
||||
it when the buffer is deleted or resized.
|
||||
@param numChannels the number of channels to use - this must correspond to the
|
||||
number of elements in the array passed in
|
||||
@param startSample the offset within the arrays at which the data begins
|
||||
@param numSamples the number of samples to use - this must correspond to the
|
||||
size of the arrays passed in
|
||||
*/
|
||||
AudioSampleBuffer (float** dataToReferTo,
|
||||
int numChannels,
|
||||
int startSample,
|
||||
int numSamples) noexcept;
|
||||
|
||||
/** Copies another buffer.
|
||||
|
||||
This buffer will make its own copy of the other's data, unless the buffer was created
|
||||
using an external data buffer, in which case boths buffers will just point to the same
|
||||
shared block of data.
|
||||
*/
|
||||
AudioSampleBuffer (const AudioSampleBuffer& other) noexcept;
|
||||
|
||||
/** Copies another buffer onto this one.
|
||||
|
||||
This buffer's size will be changed to that of the other buffer.
|
||||
*/
|
||||
AudioSampleBuffer& operator= (const AudioSampleBuffer& other) noexcept;
|
||||
|
||||
/** Destructor.
|
||||
|
||||
This will free any memory allocated by the buffer.
|
||||
*/
|
||||
virtual ~AudioSampleBuffer() noexcept;
|
||||
|
||||
//==============================================================================
|
||||
/** Returns the number of channels of audio data that this buffer contains.
|
||||
|
||||
@see getSampleData
|
||||
*/
|
||||
int getNumChannels() const noexcept { return numChannels; }
|
||||
|
||||
/** Returns the number of samples allocated in each of the buffer's channels.
|
||||
|
||||
@see getSampleData
|
||||
*/
|
||||
int getNumSamples() const noexcept { return size; }
|
||||
|
||||
/** Returns a pointer one of the buffer's channels.
|
||||
|
||||
For speed, this doesn't check whether the channel number is out of range,
|
||||
so be careful when using it!
|
||||
*/
|
||||
float* getSampleData (const int channelNumber) const noexcept
|
||||
{
|
||||
jassert (isPositiveAndBelow (channelNumber, numChannels));
|
||||
return channels [channelNumber];
|
||||
}
|
||||
|
||||
/** Returns a pointer to a sample in one of the buffer's channels.
|
||||
|
||||
For speed, this doesn't check whether the channel and sample number
|
||||
are out-of-range, so be careful when using it!
|
||||
*/
|
||||
float* getSampleData (const int channelNumber,
|
||||
const int sampleOffset) const noexcept
|
||||
{
|
||||
jassert (isPositiveAndBelow (channelNumber, numChannels));
|
||||
jassert (isPositiveAndBelow (sampleOffset, size));
|
||||
return channels [channelNumber] + sampleOffset;
|
||||
}
|
||||
|
||||
/** Returns an array of pointers to the channels in the buffer.
|
||||
|
||||
Don't modify any of the pointers that are returned, and bear in mind that
|
||||
these will become invalid if the buffer is resized.
|
||||
*/
|
||||
float** getArrayOfChannels() const noexcept { return channels; }
|
||||
|
||||
//==============================================================================
|
||||
/** Changes the buffer's size or number of channels.
|
||||
|
||||
This can expand or contract the buffer's length, and add or remove channels.
|
||||
|
||||
If keepExistingContent is true, it will try to preserve as much of the
|
||||
old data as it can in the new buffer.
|
||||
|
||||
If clearExtraSpace is true, then any extra channels or space that is
|
||||
allocated will be also be cleared. If false, then this space is left
|
||||
uninitialised.
|
||||
|
||||
If avoidReallocating is true, then changing the buffer's size won't reduce the
|
||||
amount of memory that is currently allocated (but it will still increase it if
|
||||
the new size is bigger than the amount it currently has). If this is false, then
|
||||
a new allocation will be done so that the buffer uses takes up the minimum amount
|
||||
of memory that it needs.
|
||||
|
||||
If the required memory can't be allocated, this will throw a std::bad_alloc exception.
|
||||
*/
|
||||
void setSize (int newNumChannels,
|
||||
int newNumSamples,
|
||||
bool keepExistingContent = false,
|
||||
bool clearExtraSpace = false,
|
||||
bool avoidReallocating = false) noexcept;
|
||||
|
||||
|
||||
/** Makes this buffer point to a pre-allocated set of channel data arrays.
|
||||
|
||||
There's also a constructor that lets you specify arrays like this, but this
|
||||
lets you change the channels dynamically.
|
||||
|
||||
Note that if the buffer is resized or its number of channels is changed, it
|
||||
will re-allocate memory internally and copy the existing data to this new area,
|
||||
so it will then stop directly addressing this memory.
|
||||
|
||||
@param dataToReferTo a pre-allocated array containing pointers to the data
|
||||
for each channel that should be used by this buffer. The
|
||||
buffer will only refer to this memory, it won't try to delete
|
||||
it when the buffer is deleted or resized.
|
||||
@param numChannels the number of channels to use - this must correspond to the
|
||||
number of elements in the array passed in
|
||||
@param numSamples the number of samples to use - this must correspond to the
|
||||
size of the arrays passed in
|
||||
*/
|
||||
void setDataToReferTo (float** dataToReferTo,
|
||||
int numChannels,
|
||||
int numSamples) noexcept;
|
||||
|
||||
//==============================================================================
|
||||
/** Clears all the samples in all channels. */
|
||||
void clear() noexcept;
|
||||
|
||||
/** Clears a specified region of all the channels.
|
||||
|
||||
For speed, this doesn't check whether the channel and sample number
|
||||
are in-range, so be careful!
|
||||
*/
|
||||
void clear (int startSample,
|
||||
int numSamples) noexcept;
|
||||
|
||||
/** Clears a specified region of just one channel.
|
||||
|
||||
For speed, this doesn't check whether the channel and sample number
|
||||
are in-range, so be careful!
|
||||
*/
|
||||
void clear (int channel,
|
||||
int startSample,
|
||||
int numSamples) noexcept;
|
||||
|
||||
/** Applies a gain multiple to a region of one channel.
|
||||
|
||||
For speed, this doesn't check whether the channel and sample number
|
||||
are in-range, so be careful!
|
||||
*/
|
||||
void applyGain (int channel,
|
||||
int startSample,
|
||||
int numSamples,
|
||||
float gain) noexcept;
|
||||
|
||||
/** Applies a gain multiple to a region of all the channels.
|
||||
|
||||
For speed, this doesn't check whether the sample numbers
|
||||
are in-range, so be careful!
|
||||
*/
|
||||
void applyGain (int startSample,
|
||||
int numSamples,
|
||||
float gain) noexcept;
|
||||
|
||||
/** Applies a range of gains to a region of a channel.
|
||||
|
||||
The gain that is applied to each sample will vary from
|
||||
startGain on the first sample to endGain on the last Sample,
|
||||
so it can be used to do basic fades.
|
||||
|
||||
For speed, this doesn't check whether the sample numbers
|
||||
are in-range, so be careful!
|
||||
*/
|
||||
void applyGainRamp (int channel,
|
||||
int startSample,
|
||||
int numSamples,
|
||||
float startGain,
|
||||
float endGain) noexcept;
|
||||
|
||||
/** Adds samples from another buffer to this one.
|
||||
|
||||
@param destChannel the channel within this buffer to add the samples to
|
||||
@param destStartSample the start sample within this buffer's channel
|
||||
@param source the source buffer to add from
|
||||
@param sourceChannel the channel within the source buffer to read from
|
||||
@param sourceStartSample the offset within the source buffer's channel to start reading samples from
|
||||
@param numSamples the number of samples to process
|
||||
@param gainToApplyToSource an optional gain to apply to the source samples before they are
|
||||
added to this buffer's samples
|
||||
|
||||
@see copyFrom
|
||||
*/
|
||||
void addFrom (int destChannel,
|
||||
int destStartSample,
|
||||
const AudioSampleBuffer& source,
|
||||
int sourceChannel,
|
||||
int sourceStartSample,
|
||||
int numSamples,
|
||||
float gainToApplyToSource = 1.0f) noexcept;
|
||||
|
||||
/** Adds samples from an array of floats to one of the channels.
|
||||
|
||||
@param destChannel the channel within this buffer to add the samples to
|
||||
@param destStartSample the start sample within this buffer's channel
|
||||
@param source the source data to use
|
||||
@param numSamples the number of samples to process
|
||||
@param gainToApplyToSource an optional gain to apply to the source samples before they are
|
||||
added to this buffer's samples
|
||||
|
||||
@see copyFrom
|
||||
*/
|
||||
void addFrom (int destChannel,
|
||||
int destStartSample,
|
||||
const float* source,
|
||||
int numSamples,
|
||||
float gainToApplyToSource = 1.0f) noexcept;
|
||||
|
||||
/** Adds samples from an array of floats, applying a gain ramp to them.
|
||||
|
||||
@param destChannel the channel within this buffer to add the samples to
|
||||
@param destStartSample the start sample within this buffer's channel
|
||||
@param source the source data to use
|
||||
@param numSamples the number of samples to process
|
||||
@param startGain the gain to apply to the first sample (this is multiplied with
|
||||
the source samples before they are added to this buffer)
|
||||
@param endGain the gain to apply to the final sample. The gain is linearly
|
||||
interpolated between the first and last samples.
|
||||
*/
|
||||
void addFromWithRamp (int destChannel,
|
||||
int destStartSample,
|
||||
const float* source,
|
||||
int numSamples,
|
||||
float startGain,
|
||||
float endGain) noexcept;
|
||||
|
||||
/** Copies samples from another buffer to this one.
|
||||
|
||||
@param destChannel the channel within this buffer to copy the samples to
|
||||
@param destStartSample the start sample within this buffer's channel
|
||||
@param source the source buffer to read from
|
||||
@param sourceChannel the channel within the source buffer to read from
|
||||
@param sourceStartSample the offset within the source buffer's channel to start reading samples from
|
||||
@param numSamples the number of samples to process
|
||||
|
||||
@see addFrom
|
||||
*/
|
||||
void copyFrom (int destChannel,
|
||||
int destStartSample,
|
||||
const AudioSampleBuffer& source,
|
||||
int sourceChannel,
|
||||
int sourceStartSample,
|
||||
int numSamples) noexcept;
|
||||
|
||||
/** Copies samples from an array of floats into one of the channels.
|
||||
|
||||
@param destChannel the channel within this buffer to copy the samples to
|
||||
@param destStartSample the start sample within this buffer's channel
|
||||
@param source the source buffer to read from
|
||||
@param numSamples the number of samples to process
|
||||
|
||||
@see addFrom
|
||||
*/
|
||||
void copyFrom (int destChannel,
|
||||
int destStartSample,
|
||||
const float* source,
|
||||
int numSamples) noexcept;
|
||||
|
||||
/** Copies samples from an array of floats into one of the channels, applying a gain to it.
|
||||
|
||||
@param destChannel the channel within this buffer to copy the samples to
|
||||
@param destStartSample the start sample within this buffer's channel
|
||||
@param source the source buffer to read from
|
||||
@param numSamples the number of samples to process
|
||||
@param gain the gain to apply
|
||||
|
||||
@see addFrom
|
||||
*/
|
||||
void copyFrom (int destChannel,
|
||||
int destStartSample,
|
||||
const float* source,
|
||||
int numSamples,
|
||||
float gain) noexcept;
|
||||
|
||||
/** Copies samples from an array of floats into one of the channels, applying a gain ramp.
|
||||
|
||||
@param destChannel the channel within this buffer to copy the samples to
|
||||
@param destStartSample the start sample within this buffer's channel
|
||||
@param source the source buffer to read from
|
||||
@param numSamples the number of samples to process
|
||||
@param startGain the gain to apply to the first sample (this is multiplied with
|
||||
the source samples before they are copied to this buffer)
|
||||
@param endGain the gain to apply to the final sample. The gain is linearly
|
||||
interpolated between the first and last samples.
|
||||
|
||||
@see addFrom
|
||||
*/
|
||||
void copyFromWithRamp (int destChannel,
|
||||
int destStartSample,
|
||||
const float* source,
|
||||
int numSamples,
|
||||
float startGain,
|
||||
float endGain) noexcept;
|
||||
|
||||
|
||||
/** Finds the highest and lowest sample values in a given range.
|
||||
|
||||
@param channel the channel to read from
|
||||
@param startSample the start sample within the channel
|
||||
@param numSamples the number of samples to check
|
||||
@param minVal on return, the lowest value that was found
|
||||
@param maxVal on return, the highest value that was found
|
||||
*/
|
||||
void findMinMax (int channel,
|
||||
int startSample,
|
||||
int numSamples,
|
||||
float& minVal,
|
||||
float& maxVal) const noexcept;
|
||||
|
||||
/** Finds the highest absolute sample value within a region of a channel.
|
||||
*/
|
||||
float getMagnitude (int channel,
|
||||
int startSample,
|
||||
int numSamples) const noexcept;
|
||||
|
||||
/** Finds the highest absolute sample value within a region on all channels.
|
||||
*/
|
||||
float getMagnitude (int startSample,
|
||||
int numSamples) const noexcept;
|
||||
|
||||
/** Returns the root mean squared level for a region of a channel.
|
||||
*/
|
||||
float getRMSLevel (int channel,
|
||||
int startSample,
|
||||
int numSamples) const noexcept;
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
int numChannels, size;
|
||||
size_t allocatedBytes;
|
||||
float** channels;
|
||||
HeapBlock <char, true> allocatedData;
|
||||
float* preallocatedChannelSpace [32];
|
||||
|
||||
void allocateData();
|
||||
void allocateChannels (float** dataToReferTo, int offset);
|
||||
|
||||
JUCE_LEAK_DETECTOR (AudioSampleBuffer);
|
||||
};
|
||||
|
||||
|
||||
#endif // __JUCE_AUDIOSAMPLEBUFFER_JUCEHEADER__
|
||||
@@ -1,104 +0,0 @@
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE library - "Jules' Utility Class Extensions"
|
||||
Copyright 2004-11 by Raw Material Software Ltd.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
JUCE can be redistributed and/or modified under the terms of the GNU General
|
||||
Public License (Version 2), as published by the Free Software Foundation.
|
||||
A copy of the license is included in the JUCE distribution, or can be found
|
||||
online at www.gnu.org/licenses.
|
||||
|
||||
JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
To release a closed-source product which uses JUCE, commercial licenses are
|
||||
available: visit www.rawmaterialsoftware.com/juce for more information.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#ifndef __JUCE_DECIBELS_JUCEHEADER__
|
||||
#define __JUCE_DECIBELS_JUCEHEADER__
|
||||
|
||||
//==============================================================================
|
||||
/**
|
||||
This class contains some helpful static methods for dealing with decibel values.
|
||||
*/
|
||||
class Decibels
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
/** Converts a dBFS value to its equivalent gain level.
|
||||
|
||||
A gain of 1.0 = 0 dB, and lower gains map onto negative decibel values. Any
|
||||
decibel value lower than minusInfinityDb will return a gain of 0.
|
||||
*/
|
||||
template <typename Type>
|
||||
static Type decibelsToGain (const Type decibels,
|
||||
const Type minusInfinityDb = (Type) defaultMinusInfinitydB)
|
||||
{
|
||||
return decibels > minusInfinityDb ? powf ((Type) 10.0, decibels * (Type) 0.05)
|
||||
: Type();
|
||||
}
|
||||
|
||||
/** Converts a gain level into a dBFS value.
|
||||
|
||||
A gain of 1.0 = 0 dB, and lower gains map onto negative decibel values.
|
||||
If the gain is 0 (or negative), then the method will return the value
|
||||
provided as minusInfinityDb.
|
||||
*/
|
||||
template <typename Type>
|
||||
static Type gainToDecibels (const Type gain,
|
||||
const Type minusInfinityDb = (Type) defaultMinusInfinitydB)
|
||||
{
|
||||
return gain > Type() ? jmax (minusInfinityDb, (Type) std::log10 (gain) * (Type) 20.0)
|
||||
: minusInfinityDb;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
/** Converts a decibel reading to a string, with the 'dB' suffix.
|
||||
If the decibel value is lower than minusInfinityDb, the return value will
|
||||
be "-INF dB".
|
||||
*/
|
||||
template <typename Type>
|
||||
static String toString (const Type decibels,
|
||||
const int decimalPlaces = 2,
|
||||
const Type minusInfinityDb = (Type) defaultMinusInfinitydB)
|
||||
{
|
||||
String s;
|
||||
|
||||
if (decibels <= minusInfinityDb)
|
||||
{
|
||||
s = "-INF dB";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (decibels >= Type())
|
||||
s << '+';
|
||||
|
||||
s << String (decibels, decimalPlaces) << " dB";
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
enum
|
||||
{
|
||||
defaultMinusInfinitydB = -100
|
||||
};
|
||||
|
||||
Decibels(); // This class can't be instantiated, it's just a holder for static methods..
|
||||
JUCE_DECLARE_NON_COPYABLE (Decibels);
|
||||
};
|
||||
|
||||
|
||||
#endif // __JUCE_DECIBELS_JUCEHEADER__
|
||||
@@ -1,252 +0,0 @@
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE library - "Jules' Utility Class Extensions"
|
||||
Copyright 2004-11 by Raw Material Software Ltd.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
JUCE can be redistributed and/or modified under the terms of the GNU General
|
||||
Public License (Version 2), as published by the Free Software Foundation.
|
||||
A copy of the license is included in the JUCE distribution, or can be found
|
||||
online at www.gnu.org/licenses.
|
||||
|
||||
JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
To release a closed-source product which uses JUCE, commercial licenses are
|
||||
available: visit www.rawmaterialsoftware.com/juce for more information.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#if JUCE_INTEL
|
||||
#define JUCE_SNAP_TO_ZERO(n) if (! (n < -1.0e-8 || n > 1.0e-8)) n = 0;
|
||||
#else
|
||||
#define JUCE_SNAP_TO_ZERO(n)
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
IIRFilter::IIRFilter()
|
||||
: active (false)
|
||||
{
|
||||
reset();
|
||||
}
|
||||
|
||||
IIRFilter::IIRFilter (const IIRFilter& other)
|
||||
: active (other.active)
|
||||
{
|
||||
const ScopedLock sl (other.processLock);
|
||||
memcpy (coefficients, other.coefficients, sizeof (coefficients));
|
||||
reset();
|
||||
}
|
||||
|
||||
IIRFilter::~IIRFilter()
|
||||
{
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void IIRFilter::reset() noexcept
|
||||
{
|
||||
const ScopedLock sl (processLock);
|
||||
|
||||
x1 = 0;
|
||||
x2 = 0;
|
||||
y1 = 0;
|
||||
y2 = 0;
|
||||
}
|
||||
|
||||
float IIRFilter::processSingleSampleRaw (const float in) noexcept
|
||||
{
|
||||
float out = coefficients[0] * in
|
||||
+ coefficients[1] * x1
|
||||
+ coefficients[2] * x2
|
||||
- coefficients[4] * y1
|
||||
- coefficients[5] * y2;
|
||||
|
||||
JUCE_SNAP_TO_ZERO (out);
|
||||
|
||||
x2 = x1;
|
||||
x1 = in;
|
||||
y2 = y1;
|
||||
y1 = out;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
void IIRFilter::processSamples (float* const samples,
|
||||
const int numSamples) noexcept
|
||||
{
|
||||
const ScopedLock sl (processLock);
|
||||
|
||||
if (active)
|
||||
{
|
||||
for (int i = 0; i < numSamples; ++i)
|
||||
{
|
||||
const float in = samples[i];
|
||||
|
||||
float out = coefficients[0] * in
|
||||
+ coefficients[1] * x1
|
||||
+ coefficients[2] * x2
|
||||
- coefficients[4] * y1
|
||||
- coefficients[5] * y2;
|
||||
|
||||
JUCE_SNAP_TO_ZERO (out);
|
||||
|
||||
x2 = x1;
|
||||
x1 = in;
|
||||
y2 = y1;
|
||||
y1 = out;
|
||||
|
||||
samples[i] = out;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void IIRFilter::makeLowPass (const double sampleRate,
|
||||
const double frequency) noexcept
|
||||
{
|
||||
jassert (sampleRate > 0);
|
||||
|
||||
const double n = 1.0 / tan (double_Pi * frequency / sampleRate);
|
||||
const double nSquared = n * n;
|
||||
const double c1 = 1.0 / (1.0 + std::sqrt (2.0) * n + nSquared);
|
||||
|
||||
setCoefficients (c1,
|
||||
c1 * 2.0f,
|
||||
c1,
|
||||
1.0,
|
||||
c1 * 2.0 * (1.0 - nSquared),
|
||||
c1 * (1.0 - std::sqrt (2.0) * n + nSquared));
|
||||
}
|
||||
|
||||
void IIRFilter::makeHighPass (const double sampleRate,
|
||||
const double frequency) noexcept
|
||||
{
|
||||
const double n = tan (double_Pi * frequency / sampleRate);
|
||||
const double nSquared = n * n;
|
||||
const double c1 = 1.0 / (1.0 + std::sqrt (2.0) * n + nSquared);
|
||||
|
||||
setCoefficients (c1,
|
||||
c1 * -2.0f,
|
||||
c1,
|
||||
1.0,
|
||||
c1 * 2.0 * (nSquared - 1.0),
|
||||
c1 * (1.0 - std::sqrt (2.0) * n + nSquared));
|
||||
}
|
||||
|
||||
void IIRFilter::makeLowShelf (const double sampleRate,
|
||||
const double cutOffFrequency,
|
||||
const double Q,
|
||||
const float gainFactor) noexcept
|
||||
{
|
||||
jassert (sampleRate > 0);
|
||||
jassert (Q > 0);
|
||||
|
||||
const double A = jmax (0.0f, gainFactor);
|
||||
const double aminus1 = A - 1.0;
|
||||
const double aplus1 = A + 1.0;
|
||||
const double omega = (double_Pi * 2.0 * jmax (cutOffFrequency, 2.0)) / sampleRate;
|
||||
const double coso = std::cos (omega);
|
||||
const double beta = std::sin (omega) * std::sqrt (A) / Q;
|
||||
const double aminus1TimesCoso = aminus1 * coso;
|
||||
|
||||
setCoefficients (A * (aplus1 - aminus1TimesCoso + beta),
|
||||
A * 2.0 * (aminus1 - aplus1 * coso),
|
||||
A * (aplus1 - aminus1TimesCoso - beta),
|
||||
aplus1 + aminus1TimesCoso + beta,
|
||||
-2.0 * (aminus1 + aplus1 * coso),
|
||||
aplus1 + aminus1TimesCoso - beta);
|
||||
}
|
||||
|
||||
void IIRFilter::makeHighShelf (const double sampleRate,
|
||||
const double cutOffFrequency,
|
||||
const double Q,
|
||||
const float gainFactor) noexcept
|
||||
{
|
||||
jassert (sampleRate > 0);
|
||||
jassert (Q > 0);
|
||||
|
||||
const double A = jmax (0.0f, gainFactor);
|
||||
const double aminus1 = A - 1.0;
|
||||
const double aplus1 = A + 1.0;
|
||||
const double omega = (double_Pi * 2.0 * jmax (cutOffFrequency, 2.0)) / sampleRate;
|
||||
const double coso = std::cos (omega);
|
||||
const double beta = std::sin (omega) * std::sqrt (A) / Q;
|
||||
const double aminus1TimesCoso = aminus1 * coso;
|
||||
|
||||
setCoefficients (A * (aplus1 + aminus1TimesCoso + beta),
|
||||
A * -2.0 * (aminus1 + aplus1 * coso),
|
||||
A * (aplus1 + aminus1TimesCoso - beta),
|
||||
aplus1 - aminus1TimesCoso + beta,
|
||||
2.0 * (aminus1 - aplus1 * coso),
|
||||
aplus1 - aminus1TimesCoso - beta);
|
||||
}
|
||||
|
||||
void IIRFilter::makeBandPass (const double sampleRate,
|
||||
const double centreFrequency,
|
||||
const double Q,
|
||||
const float gainFactor) noexcept
|
||||
{
|
||||
jassert (sampleRate > 0);
|
||||
jassert (Q > 0);
|
||||
|
||||
const double A = jmax (0.0f, gainFactor);
|
||||
const double omega = (double_Pi * 2.0 * jmax (centreFrequency, 2.0)) / sampleRate;
|
||||
const double alpha = 0.5 * std::sin (omega) / Q;
|
||||
const double c2 = -2.0 * std::cos (omega);
|
||||
const double alphaTimesA = alpha * A;
|
||||
const double alphaOverA = alpha / A;
|
||||
|
||||
setCoefficients (1.0 + alphaTimesA,
|
||||
c2,
|
||||
1.0 - alphaTimesA,
|
||||
1.0 + alphaOverA,
|
||||
c2,
|
||||
1.0 - alphaOverA);
|
||||
}
|
||||
|
||||
void IIRFilter::makeInactive() noexcept
|
||||
{
|
||||
const ScopedLock sl (processLock);
|
||||
active = false;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void IIRFilter::copyCoefficientsFrom (const IIRFilter& other) noexcept
|
||||
{
|
||||
const ScopedLock sl (processLock);
|
||||
|
||||
memcpy (coefficients, other.coefficients, sizeof (coefficients));
|
||||
active = other.active;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void IIRFilter::setCoefficients (double c1, double c2, double c3,
|
||||
double c4, double c5, double c6) noexcept
|
||||
{
|
||||
const double a = 1.0 / c4;
|
||||
|
||||
c1 *= a;
|
||||
c2 *= a;
|
||||
c3 *= a;
|
||||
c5 *= a;
|
||||
c6 *= a;
|
||||
|
||||
const ScopedLock sl (processLock);
|
||||
|
||||
coefficients[0] = (float) c1;
|
||||
coefficients[1] = (float) c2;
|
||||
coefficients[2] = (float) c3;
|
||||
coefficients[3] = (float) c4;
|
||||
coefficients[4] = (float) c5;
|
||||
coefficients[5] = (float) c6;
|
||||
|
||||
active = true;
|
||||
}
|
||||
|
||||
#undef JUCE_SNAP_TO_ZERO
|
||||
@@ -1,149 +0,0 @@
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE library - "Jules' Utility Class Extensions"
|
||||
Copyright 2004-11 by Raw Material Software Ltd.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
JUCE can be redistributed and/or modified under the terms of the GNU General
|
||||
Public License (Version 2), as published by the Free Software Foundation.
|
||||
A copy of the license is included in the JUCE distribution, or can be found
|
||||
online at www.gnu.org/licenses.
|
||||
|
||||
JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
To release a closed-source product which uses JUCE, commercial licenses are
|
||||
available: visit www.rawmaterialsoftware.com/juce for more information.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#ifndef __JUCE_IIRFILTER_JUCEHEADER__
|
||||
#define __JUCE_IIRFILTER_JUCEHEADER__
|
||||
|
||||
|
||||
//==============================================================================
|
||||
/**
|
||||
An IIR filter that can perform low, high, or band-pass filtering on an
|
||||
audio signal.
|
||||
|
||||
@see IIRFilterAudioSource
|
||||
*/
|
||||
class JUCE_API IIRFilter
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
/** Creates a filter.
|
||||
|
||||
Initially the filter is inactive, so will have no effect on samples that
|
||||
you process with it. Use the appropriate method to turn it into the type
|
||||
of filter needed.
|
||||
*/
|
||||
IIRFilter();
|
||||
|
||||
/** Creates a copy of another filter. */
|
||||
IIRFilter (const IIRFilter& other);
|
||||
|
||||
/** Destructor. */
|
||||
~IIRFilter();
|
||||
|
||||
//==============================================================================
|
||||
/** Resets the filter's processing pipeline, ready to start a new stream of data.
|
||||
|
||||
Note that this clears the processing state, but the type of filter and
|
||||
its coefficients aren't changed. To put a filter into an inactive state, use
|
||||
the makeInactive() method.
|
||||
*/
|
||||
void reset() noexcept;
|
||||
|
||||
/** Performs the filter operation on the given set of samples.
|
||||
*/
|
||||
void processSamples (float* samples,
|
||||
int numSamples) noexcept;
|
||||
|
||||
/** Processes a single sample, without any locking or checking.
|
||||
|
||||
Use this if you need fast processing of a single value, but be aware that
|
||||
this isn't thread-safe in the way that processSamples() is.
|
||||
*/
|
||||
float processSingleSampleRaw (float sample) noexcept;
|
||||
|
||||
//==============================================================================
|
||||
/** Sets the filter up to act as a low-pass filter.
|
||||
*/
|
||||
void makeLowPass (double sampleRate,
|
||||
double frequency) noexcept;
|
||||
|
||||
/** Sets the filter up to act as a high-pass filter.
|
||||
*/
|
||||
void makeHighPass (double sampleRate,
|
||||
double frequency) noexcept;
|
||||
|
||||
//==============================================================================
|
||||
/** Sets the filter up to act as a low-pass shelf filter with variable Q and gain.
|
||||
|
||||
The gain is a scale factor that the low frequencies are multiplied by, so values
|
||||
greater than 1.0 will boost the low frequencies, values less than 1.0 will
|
||||
attenuate them.
|
||||
*/
|
||||
void makeLowShelf (double sampleRate,
|
||||
double cutOffFrequency,
|
||||
double Q,
|
||||
float gainFactor) noexcept;
|
||||
|
||||
/** Sets the filter up to act as a high-pass shelf filter with variable Q and gain.
|
||||
|
||||
The gain is a scale factor that the high frequencies are multiplied by, so values
|
||||
greater than 1.0 will boost the high frequencies, values less than 1.0 will
|
||||
attenuate them.
|
||||
*/
|
||||
void makeHighShelf (double sampleRate,
|
||||
double cutOffFrequency,
|
||||
double Q,
|
||||
float gainFactor) noexcept;
|
||||
|
||||
/** Sets the filter up to act as a band pass filter centred around a
|
||||
frequency, with a variable Q and gain.
|
||||
|
||||
The gain is a scale factor that the centre frequencies are multiplied by, so
|
||||
values greater than 1.0 will boost the centre frequencies, values less than
|
||||
1.0 will attenuate them.
|
||||
*/
|
||||
void makeBandPass (double sampleRate,
|
||||
double centreFrequency,
|
||||
double Q,
|
||||
float gainFactor) noexcept;
|
||||
|
||||
/** Clears the filter's coefficients so that it becomes inactive.
|
||||
*/
|
||||
void makeInactive() noexcept;
|
||||
|
||||
//==============================================================================
|
||||
/** Makes this filter duplicate the set-up of another one.
|
||||
*/
|
||||
void copyCoefficientsFrom (const IIRFilter& other) noexcept;
|
||||
|
||||
|
||||
protected:
|
||||
//==============================================================================
|
||||
CriticalSection processLock;
|
||||
|
||||
void setCoefficients (double c1, double c2, double c3,
|
||||
double c4, double c5, double c6) noexcept;
|
||||
|
||||
bool active;
|
||||
float coefficients[6];
|
||||
float x1, x2, y1, y2;
|
||||
|
||||
// (use the copyCoefficientsFrom() method instead of this operator)
|
||||
IIRFilter& operator= (const IIRFilter&);
|
||||
JUCE_LEAK_DETECTOR (IIRFilter);
|
||||
};
|
||||
|
||||
|
||||
#endif // __JUCE_IIRFILTER_JUCEHEADER__
|
||||
@@ -1,325 +0,0 @@
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE library - "Jules' Utility Class Extensions"
|
||||
Copyright 2004-11 by Raw Material Software Ltd.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
JUCE can be redistributed and/or modified under the terms of the GNU General
|
||||
Public License (Version 2), as published by the Free Software Foundation.
|
||||
A copy of the license is included in the JUCE distribution, or can be found
|
||||
online at www.gnu.org/licenses.
|
||||
|
||||
JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
To release a closed-source product which uses JUCE, commercial licenses are
|
||||
available: visit www.rawmaterialsoftware.com/juce for more information.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#ifndef __JUCE_REVERB_JUCEHEADER__
|
||||
#define __JUCE_REVERB_JUCEHEADER__
|
||||
|
||||
|
||||
//==============================================================================
|
||||
/**
|
||||
Performs a simple reverb effect on a stream of audio data.
|
||||
|
||||
This is a simple stereo reverb, based on the technique and tunings used in FreeVerb.
|
||||
Use setSampleRate() to prepare it, and then call processStereo() or processMono() to
|
||||
apply the reverb to your audio data.
|
||||
|
||||
@see ReverbAudioSource
|
||||
*/
|
||||
class Reverb
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
Reverb()
|
||||
{
|
||||
setParameters (Parameters());
|
||||
setSampleRate (44100.0);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
/** Holds the parameters being used by a Reverb object. */
|
||||
struct Parameters
|
||||
{
|
||||
Parameters() noexcept
|
||||
: roomSize (0.5f),
|
||||
damping (0.5f),
|
||||
wetLevel (0.33f),
|
||||
dryLevel (0.4f),
|
||||
width (1.0f),
|
||||
freezeMode (0)
|
||||
{}
|
||||
|
||||
float roomSize; /**< Room size, 0 to 1.0, where 1.0 is big, 0 is small. */
|
||||
float damping; /**< Damping, 0 to 1.0, where 0 is not damped, 1.0 is fully damped. */
|
||||
float wetLevel; /**< Wet level, 0 to 1.0 */
|
||||
float dryLevel; /**< Dry level, 0 to 1.0 */
|
||||
float width; /**< Reverb width, 0 to 1.0, where 1.0 is very wide. */
|
||||
float freezeMode; /**< Freeze mode - values < 0.5 are "normal" mode, values > 0.5
|
||||
put the reverb into a continuous feedback loop. */
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
/** Returns the reverb's current parameters. */
|
||||
const Parameters& getParameters() const noexcept { return parameters; }
|
||||
|
||||
/** Applies a new set of parameters to the reverb.
|
||||
Note that this doesn't attempt to lock the reverb, so if you call this in parallel with
|
||||
the process method, you may get artifacts.
|
||||
*/
|
||||
void setParameters (const Parameters& newParams)
|
||||
{
|
||||
const float wetScaleFactor = 3.0f;
|
||||
const float dryScaleFactor = 2.0f;
|
||||
|
||||
const float wet = newParams.wetLevel * wetScaleFactor;
|
||||
wet1 = wet * (newParams.width * 0.5f + 0.5f);
|
||||
wet2 = wet * (1.0f - newParams.width) * 0.5f;
|
||||
dry = newParams.dryLevel * dryScaleFactor;
|
||||
gain = isFrozen (newParams.freezeMode) ? 0.0f : 0.015f;
|
||||
parameters = newParams;
|
||||
shouldUpdateDamping = true;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
/** Sets the sample rate that will be used for the reverb.
|
||||
You must call this before the process methods, in order to tell it the correct sample rate.
|
||||
*/
|
||||
void setSampleRate (const double sampleRate)
|
||||
{
|
||||
jassert (sampleRate > 0);
|
||||
|
||||
static const short combTunings[] = { 1116, 1188, 1277, 1356, 1422, 1491, 1557, 1617 }; // (at 44100Hz)
|
||||
static const short allPassTunings[] = { 556, 441, 341, 225 };
|
||||
const int stereoSpread = 23;
|
||||
const int intSampleRate = (int) sampleRate;
|
||||
|
||||
int i;
|
||||
for (i = 0; i < numCombs; ++i)
|
||||
{
|
||||
comb[0][i].setSize ((intSampleRate * combTunings[i]) / 44100);
|
||||
comb[1][i].setSize ((intSampleRate * (combTunings[i] + stereoSpread)) / 44100);
|
||||
}
|
||||
|
||||
for (i = 0; i < numAllPasses; ++i)
|
||||
{
|
||||
allPass[0][i].setSize ((intSampleRate * allPassTunings[i]) / 44100);
|
||||
allPass[1][i].setSize ((intSampleRate * (allPassTunings[i] + stereoSpread)) / 44100);
|
||||
}
|
||||
|
||||
shouldUpdateDamping = true;
|
||||
}
|
||||
|
||||
/** Clears the reverb's buffers. */
|
||||
void reset()
|
||||
{
|
||||
for (int j = 0; j < numChannels; ++j)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < numCombs; ++i)
|
||||
comb[j][i].clear();
|
||||
|
||||
for (i = 0; i < numAllPasses; ++i)
|
||||
allPass[j][i].clear();
|
||||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
/** Applies the reverb to two stereo channels of audio data. */
|
||||
void processStereo (float* const left, float* const right, const int numSamples) noexcept
|
||||
{
|
||||
jassert (left != nullptr && right != nullptr);
|
||||
|
||||
if (shouldUpdateDamping)
|
||||
updateDamping();
|
||||
|
||||
for (int i = 0; i < numSamples; ++i)
|
||||
{
|
||||
const float input = (left[i] + right[i]) * gain;
|
||||
float outL = 0, outR = 0;
|
||||
|
||||
int j;
|
||||
for (j = 0; j < numCombs; ++j) // accumulate the comb filters in parallel
|
||||
{
|
||||
outL += comb[0][j].process (input);
|
||||
outR += comb[1][j].process (input);
|
||||
}
|
||||
|
||||
for (j = 0; j < numAllPasses; ++j) // run the allpass filters in series
|
||||
{
|
||||
outL = allPass[0][j].process (outL);
|
||||
outR = allPass[1][j].process (outR);
|
||||
}
|
||||
|
||||
left[i] = outL * wet1 + outR * wet2 + left[i] * dry;
|
||||
right[i] = outR * wet1 + outL * wet2 + right[i] * dry;
|
||||
}
|
||||
}
|
||||
|
||||
/** Applies the reverb to a single mono channel of audio data. */
|
||||
void processMono (float* const samples, const int numSamples) noexcept
|
||||
{
|
||||
jassert (samples != nullptr);
|
||||
|
||||
if (shouldUpdateDamping)
|
||||
updateDamping();
|
||||
|
||||
for (int i = 0; i < numSamples; ++i)
|
||||
{
|
||||
const float input = samples[i] * gain;
|
||||
float output = 0;
|
||||
|
||||
int j;
|
||||
for (j = 0; j < numCombs; ++j) // accumulate the comb filters in parallel
|
||||
output += comb[0][j].process (input);
|
||||
|
||||
for (j = 0; j < numAllPasses; ++j) // run the allpass filters in series
|
||||
output = allPass[0][j].process (output);
|
||||
|
||||
samples[i] = output * wet1 + input * dry;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
Parameters parameters;
|
||||
|
||||
volatile bool shouldUpdateDamping;
|
||||
float gain, wet1, wet2, dry;
|
||||
|
||||
inline static bool isFrozen (const float freezeMode) noexcept { return freezeMode >= 0.5f; }
|
||||
|
||||
void updateDamping() noexcept
|
||||
{
|
||||
const float roomScaleFactor = 0.28f;
|
||||
const float roomOffset = 0.7f;
|
||||
const float dampScaleFactor = 0.4f;
|
||||
|
||||
shouldUpdateDamping = false;
|
||||
|
||||
if (isFrozen (parameters.freezeMode))
|
||||
setDamping (1.0f, 0.0f);
|
||||
else
|
||||
setDamping (parameters.damping * dampScaleFactor,
|
||||
parameters.roomSize * roomScaleFactor + roomOffset);
|
||||
}
|
||||
|
||||
void setDamping (const float dampingToUse, const float roomSizeToUse) noexcept
|
||||
{
|
||||
for (int j = 0; j < numChannels; ++j)
|
||||
for (int i = numCombs; --i >= 0;)
|
||||
comb[j][i].setFeedbackAndDamp (roomSizeToUse, dampingToUse);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
class CombFilter
|
||||
{
|
||||
public:
|
||||
CombFilter() noexcept : bufferSize (0), bufferIndex (0) {}
|
||||
|
||||
void setSize (const int size)
|
||||
{
|
||||
if (size != bufferSize)
|
||||
{
|
||||
bufferIndex = 0;
|
||||
buffer.malloc ((size_t) size);
|
||||
bufferSize = size;
|
||||
}
|
||||
|
||||
clear();
|
||||
}
|
||||
|
||||
void clear() noexcept
|
||||
{
|
||||
last = 0;
|
||||
buffer.clear ((size_t) bufferSize);
|
||||
}
|
||||
|
||||
void setFeedbackAndDamp (const float f, const float d) noexcept
|
||||
{
|
||||
damp1 = d;
|
||||
damp2 = 1.0f - d;
|
||||
feedback = f;
|
||||
}
|
||||
|
||||
inline float process (const float input) noexcept
|
||||
{
|
||||
const float output = buffer [bufferIndex];
|
||||
last = (output * damp2) + (last * damp1);
|
||||
JUCE_UNDENORMALISE (last);
|
||||
|
||||
float temp = input + (last * feedback);
|
||||
JUCE_UNDENORMALISE (temp);
|
||||
buffer [bufferIndex] = temp;
|
||||
bufferIndex = (bufferIndex + 1) % bufferSize;
|
||||
return output;
|
||||
}
|
||||
|
||||
private:
|
||||
HeapBlock<float> buffer;
|
||||
int bufferSize, bufferIndex;
|
||||
float feedback, last, damp1, damp2;
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE (CombFilter);
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
class AllPassFilter
|
||||
{
|
||||
public:
|
||||
AllPassFilter() noexcept : bufferSize (0), bufferIndex (0) {}
|
||||
|
||||
void setSize (const int size)
|
||||
{
|
||||
if (size != bufferSize)
|
||||
{
|
||||
bufferIndex = 0;
|
||||
buffer.malloc ((size_t) size);
|
||||
bufferSize = size;
|
||||
}
|
||||
|
||||
clear();
|
||||
}
|
||||
|
||||
void clear() noexcept
|
||||
{
|
||||
buffer.clear ((size_t) bufferSize);
|
||||
}
|
||||
|
||||
inline float process (const float input) noexcept
|
||||
{
|
||||
const float bufferedValue = buffer [bufferIndex];
|
||||
float temp = input + (bufferedValue * 0.5f);
|
||||
JUCE_UNDENORMALISE (temp);
|
||||
buffer [bufferIndex] = temp;
|
||||
bufferIndex = (bufferIndex + 1) % bufferSize;
|
||||
return bufferedValue - input;
|
||||
}
|
||||
|
||||
private:
|
||||
HeapBlock<float> buffer;
|
||||
int bufferSize, bufferIndex;
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE (AllPassFilter);
|
||||
};
|
||||
|
||||
enum { numCombs = 8, numAllPasses = 4, numChannels = 2 };
|
||||
|
||||
CombFilter comb [numChannels][numCombs];
|
||||
AllPassFilter allPass [numChannels][numAllPasses];
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Reverb);
|
||||
};
|
||||
|
||||
|
||||
#endif // __JUCE_REVERB_JUCEHEADER__
|
||||
@@ -1,63 +0,0 @@
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE library - "Jules' Utility Class Extensions"
|
||||
Copyright 2004-11 by Raw Material Software Ltd.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
JUCE can be redistributed and/or modified under the terms of the GNU General
|
||||
Public License (Version 2), as published by the Free Software Foundation.
|
||||
A copy of the license is included in the JUCE distribution, or can be found
|
||||
online at www.gnu.org/licenses.
|
||||
|
||||
JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
To release a closed-source product which uses JUCE, commercial licenses are
|
||||
available: visit www.rawmaterialsoftware.com/juce for more information.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#if defined (__JUCE_AUDIO_BASICS_JUCEHEADER__) && ! JUCE_AMALGAMATED_INCLUDE
|
||||
/* When you add this cpp file to your project, you mustn't include it in a file where you've
|
||||
already included any other headers - just put it inside a file on its own, possibly with your config
|
||||
flags preceding it, but don't include anything else. That also includes avoiding any automatic prefix
|
||||
header files that the compiler may be using.
|
||||
*/
|
||||
#error "Incorrect use of JUCE cpp file"
|
||||
#endif
|
||||
|
||||
// Your project must contain an AppConfig.h file with your project-specific settings in it,
|
||||
// and your header search path must make it accessible to the module's files.
|
||||
#include "AppConfig.h"
|
||||
|
||||
#include "juce_audio_basics.h"
|
||||
|
||||
namespace juce
|
||||
{
|
||||
|
||||
// START_AUTOINCLUDE buffers/*.cpp, effects/*.cpp, midi/*.cpp, sources/*.cpp, synthesisers/*.cpp
|
||||
#include "buffers/juce_AudioDataConverters.cpp"
|
||||
#include "buffers/juce_AudioSampleBuffer.cpp"
|
||||
#include "effects/juce_IIRFilter.cpp"
|
||||
#include "midi/juce_MidiBuffer.cpp"
|
||||
#include "midi/juce_MidiFile.cpp"
|
||||
#include "midi/juce_MidiKeyboardState.cpp"
|
||||
#include "midi/juce_MidiMessage.cpp"
|
||||
#include "midi/juce_MidiMessageSequence.cpp"
|
||||
#include "sources/juce_BufferingAudioSource.cpp"
|
||||
#include "sources/juce_ChannelRemappingAudioSource.cpp"
|
||||
#include "sources/juce_IIRFilterAudioSource.cpp"
|
||||
#include "sources/juce_MixerAudioSource.cpp"
|
||||
#include "sources/juce_ResamplingAudioSource.cpp"
|
||||
#include "sources/juce_ReverbAudioSource.cpp"
|
||||
#include "sources/juce_ToneGeneratorAudioSource.cpp"
|
||||
#include "synthesisers/juce_Synthesiser.cpp"
|
||||
// END_AUTOINCLUDE
|
||||
|
||||
}
|
||||
@@ -1,100 +0,0 @@
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE library - "Jules' Utility Class Extensions"
|
||||
Copyright 2004-11 by Raw Material Software Ltd.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
JUCE can be redistributed and/or modified under the terms of the GNU General
|
||||
Public License (Version 2), as published by the Free Software Foundation.
|
||||
A copy of the license is included in the JUCE distribution, or can be found
|
||||
online at www.gnu.org/licenses.
|
||||
|
||||
JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
To release a closed-source product which uses JUCE, commercial licenses are
|
||||
available: visit www.rawmaterialsoftware.com/juce for more information.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#ifndef __JUCE_AUDIO_BASICS_JUCEHEADER__
|
||||
#define __JUCE_AUDIO_BASICS_JUCEHEADER__
|
||||
|
||||
#include "../juce_core/juce_core.h"
|
||||
|
||||
//=============================================================================
|
||||
namespace juce
|
||||
{
|
||||
|
||||
// START_AUTOINCLUDE buffers, effects, midi, sources, synthesisers
|
||||
#ifndef __JUCE_AUDIODATACONVERTERS_JUCEHEADER__
|
||||
#include "buffers/juce_AudioDataConverters.h"
|
||||
#endif
|
||||
#ifndef __JUCE_AUDIOSAMPLEBUFFER_JUCEHEADER__
|
||||
#include "buffers/juce_AudioSampleBuffer.h"
|
||||
#endif
|
||||
#ifndef __JUCE_DECIBELS_JUCEHEADER__
|
||||
#include "effects/juce_Decibels.h"
|
||||
#endif
|
||||
#ifndef __JUCE_IIRFILTER_JUCEHEADER__
|
||||
#include "effects/juce_IIRFilter.h"
|
||||
#endif
|
||||
#ifndef __JUCE_REVERB_JUCEHEADER__
|
||||
#include "effects/juce_Reverb.h"
|
||||
#endif
|
||||
#ifndef __JUCE_MIDIBUFFER_JUCEHEADER__
|
||||
#include "midi/juce_MidiBuffer.h"
|
||||
#endif
|
||||
#ifndef __JUCE_MIDIFILE_JUCEHEADER__
|
||||
#include "midi/juce_MidiFile.h"
|
||||
#endif
|
||||
#ifndef __JUCE_MIDIKEYBOARDSTATE_JUCEHEADER__
|
||||
#include "midi/juce_MidiKeyboardState.h"
|
||||
#endif
|
||||
#ifndef __JUCE_MIDIMESSAGE_JUCEHEADER__
|
||||
#include "midi/juce_MidiMessage.h"
|
||||
#endif
|
||||
#ifndef __JUCE_MIDIMESSAGESEQUENCE_JUCEHEADER__
|
||||
#include "midi/juce_MidiMessageSequence.h"
|
||||
#endif
|
||||
#ifndef __JUCE_AUDIOSOURCE_JUCEHEADER__
|
||||
#include "sources/juce_AudioSource.h"
|
||||
#endif
|
||||
#ifndef __JUCE_BUFFERINGAUDIOSOURCE_JUCEHEADER__
|
||||
#include "sources/juce_BufferingAudioSource.h"
|
||||
#endif
|
||||
#ifndef __JUCE_CHANNELREMAPPINGAUDIOSOURCE_JUCEHEADER__
|
||||
#include "sources/juce_ChannelRemappingAudioSource.h"
|
||||
#endif
|
||||
#ifndef __JUCE_IIRFILTERAUDIOSOURCE_JUCEHEADER__
|
||||
#include "sources/juce_IIRFilterAudioSource.h"
|
||||
#endif
|
||||
#ifndef __JUCE_MIXERAUDIOSOURCE_JUCEHEADER__
|
||||
#include "sources/juce_MixerAudioSource.h"
|
||||
#endif
|
||||
#ifndef __JUCE_POSITIONABLEAUDIOSOURCE_JUCEHEADER__
|
||||
#include "sources/juce_PositionableAudioSource.h"
|
||||
#endif
|
||||
#ifndef __JUCE_RESAMPLINGAUDIOSOURCE_JUCEHEADER__
|
||||
#include "sources/juce_ResamplingAudioSource.h"
|
||||
#endif
|
||||
#ifndef __JUCE_REVERBAUDIOSOURCE_JUCEHEADER__
|
||||
#include "sources/juce_ReverbAudioSource.h"
|
||||
#endif
|
||||
#ifndef __JUCE_TONEGENERATORAUDIOSOURCE_JUCEHEADER__
|
||||
#include "sources/juce_ToneGeneratorAudioSource.h"
|
||||
#endif
|
||||
#ifndef __JUCE_SYNTHESISER_JUCEHEADER__
|
||||
#include "synthesisers/juce_Synthesiser.h"
|
||||
#endif
|
||||
// END_AUTOINCLUDE
|
||||
|
||||
}
|
||||
|
||||
#endif // __JUCE_AUDIO_BASICS_JUCEHEADER__
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user