flacdecoder, mpg123decoder and taglib_plugin plugins all fixed to compile (and hopefully run) on linux. Also wrote an alsa output plugin based on waveout. Jooles

This commit is contained in:
Urioxis 2009-07-18 11:50:49 +00:00
parent d5da9d8d67
commit 33b7e32bde
54 changed files with 11291 additions and 178 deletions

View File

@ -1,8 +1,69 @@
cmake_minimum_required(VERSION 2.6)
project( musikCube )
set ( musikCube_VERSION_MAJOR 2)
set ( musikCube_VERSION_MINOR 0)
set (BOOST_LIBS
system
date_time
filesystem
iostreams
thread
regex
)
set (Boost_ADDITIONAL_VERSIONS "1.37.0" )
if(WIN32 AND NOT UNIX)
find_package(Boost 1.36.0 COMPONENTS ${BOOST_LIBS} )
if (Boost_FOUND)
add_definitions (-DHAVE_BOOST)
endif (Boost_FOUND)
else(WIN32 AND NOT UNIX)
find_package(Boost 1.36.0 REQUIRED ${BOOST_LIBS})
add_definitions (-DHAVE_BOOST
-D_FILE_OFFSET_BITS=64)
find_package(Qt4 REQUIRED)
#add_definitions(${QT_DEFINITIONS})
#include_directories(${QT_INCLUDE_DIR})
set (linux_LINK_LIBS
dl
expat
)
endif(WIN32 AND NOT UNIX)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/Modules )
include(UseDoxygen)
set(DOXYFILE_OUTPUT_DIRECTORY docs)
SET (CMAKE_BUILD_TYPE DEBUG)
set (LIBRARY_OUTPUT_PATH ${musikCube_SOURCE_DIR}/lib)
set (EXECUTABLE_OUTPUT_PATH ${musikCibe_SOURCE_DIR}/bin)
set (EXECUTABLE_OUTPUT_PATH ${musikCube_SOURCE_DIR}/bin)
link_directories (${musikCube_SOURCE_DIR}/lib)
set (musikCube_LINK_LIBS
${linux_LINK_LIBS}
boost_system
boost_iostreams
boost_filesystem
boost_thread
boost_regex
boost_date_time
sqlite3
md5
)
include_directories ( "/usr/include/taglib"
"${musikCube_SOURCE_DIR}/src"
"${musikCube_SOURCE_DIR}/src/core"
"${musikCube_SOURCE_DIR}/src/3rdparty/include")
add_subdirectory(src/3rdparty)
add_subdirectory(src/core)
add_subdirectory(src/contrib)
#add_subdirectory(src/server)
#add_subdirectory(src/square)
#add_subdirectory(src/cube)

13
src/3rdparty/CMakeLists.txt vendored Normal file
View File

@ -0,0 +1,13 @@
if (UNIX AND NOT WIN32)
if (CMAKE_SIZEOF_VOID_P MATCHES "8")
add_definitions(-fPIC)
endif (CMAKE_SIZEOF_VOID_P MATCHES "8")
endif (UNIX AND NOT WIN32)
set (3rdParty_MD5_SOURCES
include/md5/md5.h
src/md5/md5.c
)
include_directories ( include/md5 )
add_library( md5 STATIC ${3rdParty_MD5_SOURCES} )

View File

@ -0,0 +1,22 @@
#add_subdirectory( aacdecoder )
#add_subdirectory( apedecoder )
#add_subdirectory( bpm_analyzer )
add_subdirectory( cddadecoder )
#add_subdirectory( dsp_example_echo )
add_subdirectory( flacdecoder )
#add_subdirectory( httpstream )
#add_subdirectory( oggdecoder )
find_package(Taglib)
add_definitions(-D_HAVE_TAGLIB)
add_subdirectory( taglib_plugin )
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
add_subdirectory( waveout )
add_subdirectory( mp3decoder )
# if(NOT DEFINED MINGW)
#
# endif(NOT DEFINED MINGW)
else(CMAKE_SYSTEM_NAME MATCHES "Windows")
add_subdirectory( alsaout )
add_subdirectory( mpg123decoder )
endif(CMAKE_SYSTEM_NAME MATCHES "Windows")

View File

@ -0,0 +1,33 @@
set ( aacdecoder_SOURCES
aacdecoder_plugin.cpp
AACSourceSupplier.cpp
stdafx.cpp
drms.c
m4aAudioSource.cpp
mp4atom.c
mp4ff.c
mp4meta.c
mp4sample.c
mp4tagupdate.c
mp4util.c
)
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
add_definitions(-DWIN32)
if(NOT DEFINED MINGW)
endif(NOT DEFINED MINGW)
else(CMAKE_SYSTEM_NAME MATCHES "Windows")
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -fpermissive)
endif(CMAKE_SYSTEM_NAME MATCHES "Windows")
add_definitions(
-DXML_STATIC
-D_CRT_SECURE_NO_DEPRECATE
-D_DEBUG
)
add_library( aacdecoder SHARED ${aacdecoder_SOURCES} )
target_link_libraries( aacdecoder ${musikCube_LINK_LIBS})

View File

@ -0,0 +1,234 @@
//////////////////////////////////////////////////////////////////////////////
// Copyright 2007, Daniel nnerby
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// * Neither the name of the author nor the names of other contributors may
// be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
//////////////////////////////////////////////////////////////////////////////
#include "AlsaOut.h"
AlsaOut::AlsaOut()
:waveHandle(NULL)
,maxBuffers(32)
,currentVolume(1.0)
,addToRemovedBuffers(false)
,device("default")
,output(NULL)
{
}
AlsaOut::~AlsaOut(){
this->ClearBuffers();
if(this->waveHandle!=NULL){
snd_pcm_close(this->waveHandle);
this->waveHandle = NULL;
}
}
void AlsaOut::Destroy(){
delete this;
}
/*
void WaveOut::Initialize(IPlayer *player){
this->player = player;
}
*/
void AlsaOut::Pause(){
snd_pcm_pause(this->waveHandle, 1);
}
void AlsaOut::Resume(){
snd_pcm_pause(this->waveHandle, 0);
}
void AlsaOut::SetVolume(double volume){
/*if(this->waveHandle){
DWORD newVolume = (DWORD)(volume*65535.0);
newVolume += newVolume*65536;
waveOutSetVolume(this->waveHandle,newVolume);
}
this->currentVolume = volume;*/ //TODO: Write alsa SetVolume() function
}
void AlsaOut::ClearBuffers(){
snd_pcm_drop(this->waveHandle);
snd_pcm_reset(this->waveHandle);
}
void AlsaOut::RemoveBuffer(AlsaOutBuffer *buffer){
BufferList clearBuffers;
{
boost::mutex::scoped_lock lock(this->mutex);
bool found(false);
for(BufferList::iterator buf=this->buffers.begin();buf!=this->buffers.end() && !found;){
if(buf->get()==buffer){
// if( !(*buf)->ReadyToRelease() ){
this->removedBuffers.push_back(*buf);
// }
clearBuffers.push_back(*buf);
buf=this->buffers.erase(buf);
found=true;
}else{
++buf;
}
}
}
}
void AlsaOut::ReleaseBuffers(){
BufferList clearBuffers;
{
boost::mutex::scoped_lock lock(this->mutex);
for(BufferList::iterator buf=this->removedBuffers.begin();buf!=this->removedBuffers.end();){
clearBuffers.push_back(*buf);
buf = this->removedBuffers.erase(buf);
}
}
}
bool AlsaOut::PlayBuffer(IBuffer *buffer,IPlayer *player){
size_t bufferSize = 0;
{
boost::mutex::scoped_lock lock(this->mutex);
bufferSize = this->buffers.size();
}
// if the format should change, wait for all buffers to be released
if(bufferSize>0 && (this->currentChannels!=buffer->Channels() || this->currentSampleRate!=buffer->SampleRate())){
// Format has changed
// this->player->Notify()
return false;
}
if(bufferSize<this->maxBuffers){
// Start by checking the format
this->SetFormat(buffer);
// Add to the waveout internal buffers
AlsaOutBufferPtr alsaBuffer(new AlsaOutBuffer(this,buffer,player));
// Header should now be prepared, lets add to waveout
if( alsaBuffer->AddToOutput() ){
// Add to the buffer list
{
boost::mutex::scoped_lock lock(this->mutex);
this->buffers.push_back(alsaBuffer);
}
return true;
}
}
return false;
}
void AlsaOut::SetFormat(IBuffer *buffer){
if(this->currentChannels!=buffer->Channels() || this->currentSampleRate!=buffer->SampleRate() ||this->waveHandle==NULL){
this->currentChannels = buffer->Channels();
this->currentSampleRate = buffer->SampleRate();
// Close old waveout
if(this->waveHandle!=NULL){
snd_pcm_close(this->waveHandle);
this->waveHandle = NULL;
}
/*
// Create a new waveFormat
ZeroMemory(&this->waveFormat, sizeof(this->waveFormat));
DWORD speakerconfig;
// Set speaker configuration
switch(buffer->Channels()){
case 1:
speakerconfig = KSAUDIO_SPEAKER_MONO;
break;
case 2:
speakerconfig = KSAUDIO_SPEAKER_STEREO;
break;
case 4:
speakerconfig = KSAUDIO_SPEAKER_QUAD;
break;
case 5:
speakerconfig = (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | SPEAKER_FRONT_CENTER | SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT);
break;
case 6:
speakerconfig = KSAUDIO_SPEAKER_5POINT1;
break;
default:
speakerconfig = 0;
}
this->waveFormat.Format.cbSize = 22;
this->waveFormat.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE;
this->waveFormat.Format.nChannels = (WORD)buffer->Channels();
this->waveFormat.Format.nSamplesPerSec = (DWORD)buffer->SampleRate();
this->waveFormat.Format.wBitsPerSample = 32;
this->waveFormat.Format.nBlockAlign = (this->waveFormat.Format.wBitsPerSample/8) * this->waveFormat.Format.nChannels;
this->waveFormat.Format.nAvgBytesPerSec = ((this->waveFormat.Format.wBitsPerSample/8) * this->waveFormat.Format.nChannels) * this->waveFormat.Format.nSamplesPerSec; //Compute using nBlkAlign * nSamp/Sec
// clangen: wValidBitsPerSample/wReserved/wSamplesPerBlock are a union,
// so don't set wReserved or wSamplesPerBlock to 0 after assigning
// wValidBitsPerSample. (Vista bug)
this->waveFormat.Samples.wValidBitsPerSample = 32;
this->waveFormat.dwChannelMask = speakerconfig;
this->waveFormat.SubFormat = KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
*/
this->waveFormat = SND_PCM_FORMAT_FLOAT_LE;
this->waveAccess = SND_PCM_ACCESS_RW_INTERLEAVED;
int err;
//Open the device
if ((err = snd_pcm_open(&this->waveHandle, device, SND_PCM_STREAM_PLAYBACK, 0)) < 0) {
printf("Playback open error: %s\n", snd_strerror(err));
return;
}
//Set simple parameters
if (( err = snd_pcm_set_params(
this->waveHandle,
this->waveFormat,
this->waveAccess,
this->currentChannels,
this->currentSampleRate,
1, //Allow alsa-lib software resampling
500000) //Required overall latency (us) /* 0.5s */
) > 0) { //If an error...
printf("Playback open error: %s\n", snd_strerror(err));
exit(EXIT_FAILURE);
}
// Set the volume if it's not already set
this->SetVolume(this->currentVolume);
}
}

View File

@ -0,0 +1,100 @@
//////////////////////////////////////////////////////////////////////////////
// Copyright © 2009, Julian Cromarty
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// * Neither the name of the author nor the names of other contributors may
// be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
//////////////////////////////////////////////////////////////////////////////
#pragma once
#include "pch.h"
#include "AlsaOutBuffer.h"
/*
#include <boost/thread/condition.hpp>
#include <boost/thread/thread.hpp>
#include <core/audio/IAudioCallback.h>
#include <core/audio/IAudioOutput.h>
*/
#include <core/audio/IOutput.h>
#include <list>
#include <boost/shared_ptr.hpp>
#include <boost/thread/mutex.hpp>
using namespace musik::core::audio;
class AlsaOut : public IOutput{
public:
AlsaOut();
~AlsaOut();
virtual void Destroy();
//virtual void Initialize(IPlayer *player);
virtual void Pause();
virtual void Resume();
virtual void SetVolume(double volume);
virtual void ClearBuffers();
virtual bool PlayBuffer(IBuffer *buffer,IPlayer *player);
virtual void ReleaseBuffers();
public:
typedef boost::shared_ptr<AlsaOutBuffer> AlsaOutBufferPtr;
//static void CALLBACK WaveCallback(HWAVEOUT hWave, UINT msg, DWORD_PTR dwUser, DWORD_PTR dw1, DWORD dw2);
void RemoveBuffer(AlsaOutBuffer *buffer);
private:
void SetFormat(IBuffer *buffer);
char *device; /* playback device */
protected:
friend class AlsaOutBuffer;
//IPlayer *player;
// Audio stuff
snd_output_t *output;
snd_pcm_t *waveHandle;
snd_pcm_format_t waveFormat;
snd_pcm_access_t waveAccess;
// Current format
int currentChannels;
long currentSampleRate;
double currentVolume;
typedef std::list<AlsaOutBufferPtr> BufferList;
BufferList buffers;
BufferList removedBuffers;
size_t maxBuffers;
boost::mutex mutex;
bool addToRemovedBuffers;
};

View File

@ -0,0 +1,94 @@
//////////////////////////////////////////////////////////////////////////////
// Copyright ﺏ 2007, Daniel ﺿnnerby
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// * Neither the name of the author nor the names of other contributors may
// be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
//////////////////////////////////////////////////////////////////////////////
#include "AlsaOutBuffer.h"
#include "AlsaOut.h"
//////////////////////////////////////////////////////////////////////////////
AlsaOutBuffer::AlsaOutBuffer(AlsaOut *alsaOut,IBuffer *buffer,IPlayer *player)
:waveOut(alsaOut)
,buffer(buffer)
,player(player)
{
this->PrepareBuffer();
}
void AlsaOutBuffer::PrepareBuffer(){
//unsigned float bufSize = this->buffer->Samples()*this->buffer->Channels()*sizeof(float);
/*// Prepare the header
this->header.dwBufferLength = this->buffer->Samples()*this->buffer->Channels()*sizeof(float);
this->header.lpData = (LPSTR)this->buffer->BufferPointer();
this->header.dwUser = (DWORD_PTR)this;
this->header.dwBytesRecorded = 0;
this->header.dwFlags = 0;
this->header.dwLoops = 0;
this->header.lpNext = NULL;
this->header.reserved = NULL;
MMRESULT result = waveOutPrepareHeader(this->waveOut->waveHandle,&this->header,sizeof(WAVEHDR));
if(result!=MMSYSERR_NOERROR){
throw;
}
this->header.dwFlags |= WHDR_DONE;
*/
data = this->buffer->BufferPointer();
bufferLength = this->buffer->Samples()*this->buffer->Channels()*sizeof(float);
//TODO: Check data types.
}
AlsaOutBuffer::~AlsaOutBuffer(void)
{
this->player->ReleaseBuffer(this->buffer);
}
bool AlsaOutBuffer::AddToOutput(){
/*MMRESULT result = waveOutWrite(this->waveOut->waveHandle,&this->header,sizeof(WAVEHDR));
if(result==MMSYSERR_NOERROR){
return true;
}*/
int err;
frames = snd_pcm_writei(waveOut->waveHandle, (void*)data, bufferLength);
if (frames < 0)
frames = snd_pcm_recover(waveOut->waveHandle, frames, 0);
if (frames < 0) {
printf("snd_pcm_writei failed: %s\n", snd_strerror(err));
return false;
}
if (frames > 0 && frames < (long)bufferLength) {
printf("Short write (expected %li, wrote %li)\n", (long)bufferLength, frames);
return false;
}
else return true;
}

View File

@ -0,0 +1,69 @@
//////////////////////////////////////////////////////////////////////////////
// Copyright <20> 2007, Daniel <20>nnerby
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// * Neither the name of the author nor the names of other contributors may
// be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
//////////////////////////////////////////////////////////////////////////////
#pragma once
#include <core/audio/IBuffer.h>
#include <core/audio/IPlayer.h>
#include <alsa/asoundlib.h>
//////////////////////////////////////////////////////////////////////////////
// Forward declare
class AlsaOut;
//////////////////////////////////////////////////////////////////////////////
using namespace musik::core::audio;
class AlsaOutBuffer
{
public:
AlsaOutBuffer(AlsaOut *waveOut,IBuffer *buffer,IPlayer *player);
~AlsaOutBuffer(void);
bool AddToOutput();
void PrepareBuffer();
AlsaOut *waveOut;
IBuffer *buffer;
IPlayer *player;
//snd_pcm_channel_area_t *areas;
private:
snd_pcm_sframes_t frames;
float* data;
int bufferLength;
};
//////////////////////////////////////////////////////////////////////////////

View File

@ -0,0 +1,25 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.6
# Relative path conversion top directories.
SET(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/urioxis/programming/musikcube")
SET(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/urioxis/programming/musikcube")
# Force unix paths in dependencies.
SET(CMAKE_FORCE_UNIX_PATHS 1)
# The C and CXX include file search paths:
SET(CMAKE_C_INCLUDE_PATH
"/usr/include/taglib"
"src"
"src/core"
"src/3rdparty/include"
)
SET(CMAKE_CXX_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH})
SET(CMAKE_Fortran_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH})
# The C and CXX include file regular expressions for this directory.
SET(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$")
SET(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$")
SET(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})
SET(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN})

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,26 @@
# The set of languages for which implicit dependencies are needed:
SET(CMAKE_DEPENDS_LANGUAGES
"CXX"
)
# The set of files for implicit dependencies of each language:
SET(CMAKE_DEPENDS_CHECK_CXX
"/home/urioxis/programming/musikcube/src/contrib/alsaout/AlsaOut.cpp" "/home/urioxis/programming/musikcube/src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOut.cpp.o"
"/home/urioxis/programming/musikcube/src/contrib/alsaout/AlsaOutBuffer.cpp" "/home/urioxis/programming/musikcube/src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOutBuffer.cpp.o"
"/home/urioxis/programming/musikcube/src/contrib/alsaout/alsaout_plugin.cpp" "/home/urioxis/programming/musikcube/src/contrib/alsaout/CMakeFiles/alsaout.dir/alsaout_plugin.cpp.o"
)
SET(CMAKE_CXX_COMPILER_ID "GNU")
# Preprocessor definitions for this target.
SET(CMAKE_TARGET_DEFINITIONS
"HAVE_BOOST"
"_FILE_OFFSET_BITS=64"
"_HAVE_TAGLIB"
"XML_STATIC"
"_CRT_SECURE_NO_DEPRECATE"
"_DEBUG"
)
# Targets to which this target links.
SET(CMAKE_TARGET_LINKED_INFO_FILES
"/home/urioxis/programming/musikcube/src/3rdparty/CMakeFiles/md5.dir/DependInfo.cmake"
)

View File

@ -0,0 +1,158 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.6
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canoncical targets will work.
.SUFFIXES:
# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =
.SUFFIXES: .hpux_make_needs_suffix_list
# Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
# The shell in which to execute make rules.
SHELL = /bin/sh
# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake
# The command to remove a file.
RM = /usr/bin/cmake -E remove -f
# The program to use to edit the cache.
CMAKE_EDIT_COMMAND = /usr/bin/ccmake
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /home/urioxis/programming/musikcube
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /home/urioxis/programming/musikcube
# Include any dependencies generated for this target.
include src/contrib/alsaout/CMakeFiles/alsaout.dir/depend.make
# Include the progress variables for this target.
include src/contrib/alsaout/CMakeFiles/alsaout.dir/progress.make
# Include the compile flags for this target's objects.
include src/contrib/alsaout/CMakeFiles/alsaout.dir/flags.make
src/contrib/alsaout/CMakeFiles/alsaout.dir/alsaout_plugin.cpp.o: src/contrib/alsaout/CMakeFiles/alsaout.dir/flags.make
src/contrib/alsaout/CMakeFiles/alsaout.dir/alsaout_plugin.cpp.o: src/contrib/alsaout/alsaout_plugin.cpp
$(CMAKE_COMMAND) -E cmake_progress_report /home/urioxis/programming/musikcube/CMakeFiles $(CMAKE_PROGRESS_1)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building CXX object src/contrib/alsaout/CMakeFiles/alsaout.dir/alsaout_plugin.cpp.o"
cd /home/urioxis/programming/musikcube/src/contrib/alsaout && /usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) -o CMakeFiles/alsaout.dir/alsaout_plugin.cpp.o -c /home/urioxis/programming/musikcube/src/contrib/alsaout/alsaout_plugin.cpp
src/contrib/alsaout/CMakeFiles/alsaout.dir/alsaout_plugin.cpp.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/alsaout.dir/alsaout_plugin.cpp.i"
cd /home/urioxis/programming/musikcube/src/contrib/alsaout && /usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) -E /home/urioxis/programming/musikcube/src/contrib/alsaout/alsaout_plugin.cpp > CMakeFiles/alsaout.dir/alsaout_plugin.cpp.i
src/contrib/alsaout/CMakeFiles/alsaout.dir/alsaout_plugin.cpp.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/alsaout.dir/alsaout_plugin.cpp.s"
cd /home/urioxis/programming/musikcube/src/contrib/alsaout && /usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) -S /home/urioxis/programming/musikcube/src/contrib/alsaout/alsaout_plugin.cpp -o CMakeFiles/alsaout.dir/alsaout_plugin.cpp.s
src/contrib/alsaout/CMakeFiles/alsaout.dir/alsaout_plugin.cpp.o.requires:
.PHONY : src/contrib/alsaout/CMakeFiles/alsaout.dir/alsaout_plugin.cpp.o.requires
src/contrib/alsaout/CMakeFiles/alsaout.dir/alsaout_plugin.cpp.o.provides: src/contrib/alsaout/CMakeFiles/alsaout.dir/alsaout_plugin.cpp.o.requires
$(MAKE) -f src/contrib/alsaout/CMakeFiles/alsaout.dir/build.make src/contrib/alsaout/CMakeFiles/alsaout.dir/alsaout_plugin.cpp.o.provides.build
.PHONY : src/contrib/alsaout/CMakeFiles/alsaout.dir/alsaout_plugin.cpp.o.provides
src/contrib/alsaout/CMakeFiles/alsaout.dir/alsaout_plugin.cpp.o.provides.build: src/contrib/alsaout/CMakeFiles/alsaout.dir/alsaout_plugin.cpp.o
.PHONY : src/contrib/alsaout/CMakeFiles/alsaout.dir/alsaout_plugin.cpp.o.provides.build
src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOut.cpp.o: src/contrib/alsaout/CMakeFiles/alsaout.dir/flags.make
src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOut.cpp.o: src/contrib/alsaout/AlsaOut.cpp
$(CMAKE_COMMAND) -E cmake_progress_report /home/urioxis/programming/musikcube/CMakeFiles $(CMAKE_PROGRESS_2)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building CXX object src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOut.cpp.o"
cd /home/urioxis/programming/musikcube/src/contrib/alsaout && /usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) -o CMakeFiles/alsaout.dir/AlsaOut.cpp.o -c /home/urioxis/programming/musikcube/src/contrib/alsaout/AlsaOut.cpp
src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOut.cpp.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/alsaout.dir/AlsaOut.cpp.i"
cd /home/urioxis/programming/musikcube/src/contrib/alsaout && /usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) -E /home/urioxis/programming/musikcube/src/contrib/alsaout/AlsaOut.cpp > CMakeFiles/alsaout.dir/AlsaOut.cpp.i
src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOut.cpp.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/alsaout.dir/AlsaOut.cpp.s"
cd /home/urioxis/programming/musikcube/src/contrib/alsaout && /usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) -S /home/urioxis/programming/musikcube/src/contrib/alsaout/AlsaOut.cpp -o CMakeFiles/alsaout.dir/AlsaOut.cpp.s
src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOut.cpp.o.requires:
.PHONY : src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOut.cpp.o.requires
src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOut.cpp.o.provides: src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOut.cpp.o.requires
$(MAKE) -f src/contrib/alsaout/CMakeFiles/alsaout.dir/build.make src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOut.cpp.o.provides.build
.PHONY : src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOut.cpp.o.provides
src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOut.cpp.o.provides.build: src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOut.cpp.o
.PHONY : src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOut.cpp.o.provides.build
src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOutBuffer.cpp.o: src/contrib/alsaout/CMakeFiles/alsaout.dir/flags.make
src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOutBuffer.cpp.o: src/contrib/alsaout/AlsaOutBuffer.cpp
$(CMAKE_COMMAND) -E cmake_progress_report /home/urioxis/programming/musikcube/CMakeFiles $(CMAKE_PROGRESS_3)
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Building CXX object src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOutBuffer.cpp.o"
cd /home/urioxis/programming/musikcube/src/contrib/alsaout && /usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) -o CMakeFiles/alsaout.dir/AlsaOutBuffer.cpp.o -c /home/urioxis/programming/musikcube/src/contrib/alsaout/AlsaOutBuffer.cpp
src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOutBuffer.cpp.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/alsaout.dir/AlsaOutBuffer.cpp.i"
cd /home/urioxis/programming/musikcube/src/contrib/alsaout && /usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) -E /home/urioxis/programming/musikcube/src/contrib/alsaout/AlsaOutBuffer.cpp > CMakeFiles/alsaout.dir/AlsaOutBuffer.cpp.i
src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOutBuffer.cpp.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/alsaout.dir/AlsaOutBuffer.cpp.s"
cd /home/urioxis/programming/musikcube/src/contrib/alsaout && /usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) -S /home/urioxis/programming/musikcube/src/contrib/alsaout/AlsaOutBuffer.cpp -o CMakeFiles/alsaout.dir/AlsaOutBuffer.cpp.s
src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOutBuffer.cpp.o.requires:
.PHONY : src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOutBuffer.cpp.o.requires
src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOutBuffer.cpp.o.provides: src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOutBuffer.cpp.o.requires
$(MAKE) -f src/contrib/alsaout/CMakeFiles/alsaout.dir/build.make src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOutBuffer.cpp.o.provides.build
.PHONY : src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOutBuffer.cpp.o.provides
src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOutBuffer.cpp.o.provides.build: src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOutBuffer.cpp.o
.PHONY : src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOutBuffer.cpp.o.provides.build
# Object files for target alsaout
alsaout_OBJECTS = \
"CMakeFiles/alsaout.dir/alsaout_plugin.cpp.o" \
"CMakeFiles/alsaout.dir/AlsaOut.cpp.o" \
"CMakeFiles/alsaout.dir/AlsaOutBuffer.cpp.o"
# External object files for target alsaout
alsaout_EXTERNAL_OBJECTS =
lib/libalsaout.so: src/contrib/alsaout/CMakeFiles/alsaout.dir/alsaout_plugin.cpp.o
lib/libalsaout.so: src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOut.cpp.o
lib/libalsaout.so: src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOutBuffer.cpp.o
lib/libalsaout.so: lib/libmd5.a
lib/libalsaout.so: src/contrib/alsaout/CMakeFiles/alsaout.dir/build.make
lib/libalsaout.so: src/contrib/alsaout/CMakeFiles/alsaout.dir/link.txt
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --red --bold "Linking CXX shared library ../../../lib/libalsaout.so"
cd /home/urioxis/programming/musikcube/src/contrib/alsaout && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/alsaout.dir/link.txt --verbose=$(VERBOSE)
# Rule to build all files generated by this target.
src/contrib/alsaout/CMakeFiles/alsaout.dir/build: lib/libalsaout.so
.PHONY : src/contrib/alsaout/CMakeFiles/alsaout.dir/build
src/contrib/alsaout/CMakeFiles/alsaout.dir/requires: src/contrib/alsaout/CMakeFiles/alsaout.dir/alsaout_plugin.cpp.o.requires
src/contrib/alsaout/CMakeFiles/alsaout.dir/requires: src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOut.cpp.o.requires
src/contrib/alsaout/CMakeFiles/alsaout.dir/requires: src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOutBuffer.cpp.o.requires
.PHONY : src/contrib/alsaout/CMakeFiles/alsaout.dir/requires
src/contrib/alsaout/CMakeFiles/alsaout.dir/clean:
cd /home/urioxis/programming/musikcube/src/contrib/alsaout && $(CMAKE_COMMAND) -P CMakeFiles/alsaout.dir/cmake_clean.cmake
.PHONY : src/contrib/alsaout/CMakeFiles/alsaout.dir/clean
src/contrib/alsaout/CMakeFiles/alsaout.dir/depend:
cd /home/urioxis/programming/musikcube && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/urioxis/programming/musikcube /home/urioxis/programming/musikcube/src/contrib/alsaout /home/urioxis/programming/musikcube /home/urioxis/programming/musikcube/src/contrib/alsaout /home/urioxis/programming/musikcube/src/contrib/alsaout/CMakeFiles/alsaout.dir/DependInfo.cmake --color=$(COLOR)
.PHONY : src/contrib/alsaout/CMakeFiles/alsaout.dir/depend

View File

@ -0,0 +1,13 @@
FILE(REMOVE_RECURSE
"CMakeFiles/alsaout.dir/alsaout_plugin.cpp.o"
"CMakeFiles/alsaout.dir/AlsaOut.cpp.o"
"CMakeFiles/alsaout.dir/AlsaOutBuffer.cpp.o"
"../../../lib/libalsaout.pdb"
"../../../lib/libalsaout.a"
"../../../lib/libalsaout.so"
)
# Per-language clean rules from dependency scanning.
FOREACH(lang CXX)
INCLUDE(CMakeFiles/alsaout.dir/cmake_clean_${lang}.cmake OPTIONAL)
ENDFOREACH(lang)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.6
# compile CXX with /usr/bin/c++
CXX_FLAGS = -fpermissive -g -fPIC -I/usr/include/taglib -I/home/urioxis/programming/musikcube/src -I/home/urioxis/programming/musikcube/src/core -I/home/urioxis/programming/musikcube/src/3rdparty/include
CXX_DEFINES = -Dalsaout_EXPORTS -DHAVE_BOOST -D_FILE_OFFSET_BITS=64 -D_HAVE_TAGLIB -DXML_STATIC -D_CRT_SECURE_NO_DEPRECATE -D_DEBUG

View File

@ -0,0 +1 @@
/usr/bin/c++ -fPIC -fpermissive -g -shared -Wl,-soname,libalsaout.so -o ../../../lib/libalsaout.so CMakeFiles/alsaout.dir/alsaout_plugin.cpp.o CMakeFiles/alsaout.dir/AlsaOut.cpp.o CMakeFiles/alsaout.dir/AlsaOutBuffer.cpp.o -L/home/urioxis/programming/musikcube/lib -ldl -lexpat -lboost_system -lboost_iostreams -lboost_filesystem -lboost_thread -lboost_regex -lboost_date_time -lsqlite3 ../../../lib/libmd5.a -lasound -Wl,-rpath,/home/urioxis/programming/musikcube/lib

View File

@ -0,0 +1,4 @@
CMAKE_PROGRESS_1 = 69
CMAKE_PROGRESS_2 = 70
CMAKE_PROGRESS_3 = 71

View File

@ -0,0 +1 @@
4

View File

@ -0,0 +1,28 @@
set ( alsaout_SOURCES
alsaout_plugin.cpp
AlsaOut.cpp
AlsaOutBuffer.cpp
)
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
add_definitions(-DWIN32)
if(NOT DEFINED MINGW)
endif(NOT DEFINED MINGW)
else(CMAKE_SYSTEM_NAME MATCHES "Windows")
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -fpermissive)
endif(CMAKE_SYSTEM_NAME MATCHES "Windows")
add_definitions(
-DXML_STATIC
-D_CRT_SECURE_NO_DEPRECATE
-D_DEBUG
)
#include_directories( ../../core )
include_directories(/usr/include)
add_library( alsaout SHARED ${alsaout_SOURCES} )
target_link_libraries( alsaout ${musikCube_LINK_LIBS} asound)

View File

@ -0,0 +1,218 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.6
# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canoncical targets will work.
.SUFFIXES:
# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =
.SUFFIXES: .hpux_make_needs_suffix_list
# Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
# The shell in which to execute make rules.
SHELL = /bin/sh
# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake
# The command to remove a file.
RM = /usr/bin/cmake -E remove -f
# The program to use to edit the cache.
CMAKE_EDIT_COMMAND = /usr/bin/ccmake
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /home/urioxis/programming/musikcube
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /home/urioxis/programming/musikcube
#=============================================================================
# Targets provided globally by CMake.
# Special rule for the target edit_cache
edit_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
/usr/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : edit_cache
# Special rule for the target edit_cache
edit_cache/fast: edit_cache
.PHONY : edit_cache/fast
# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
/usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache
# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/fast
# The main all target
all: cmake_check_build_system
cd /home/urioxis/programming/musikcube && $(CMAKE_COMMAND) -E cmake_progress_start /home/urioxis/programming/musikcube/CMakeFiles /home/urioxis/programming/musikcube/src/contrib/alsaout/CMakeFiles/progress.make
cd /home/urioxis/programming/musikcube && $(MAKE) -f CMakeFiles/Makefile2 src/contrib/alsaout/all
$(CMAKE_COMMAND) -E cmake_progress_start /home/urioxis/programming/musikcube/CMakeFiles 0
.PHONY : all
# The main clean target
clean:
cd /home/urioxis/programming/musikcube && $(MAKE) -f CMakeFiles/Makefile2 src/contrib/alsaout/clean
.PHONY : clean
# The main clean target
clean/fast: clean
.PHONY : clean/fast
# Prepare targets for installation.
preinstall: all
cd /home/urioxis/programming/musikcube && $(MAKE) -f CMakeFiles/Makefile2 src/contrib/alsaout/preinstall
.PHONY : preinstall
# Prepare targets for installation.
preinstall/fast:
cd /home/urioxis/programming/musikcube && $(MAKE) -f CMakeFiles/Makefile2 src/contrib/alsaout/preinstall
.PHONY : preinstall/fast
# clear depends
depend:
cd /home/urioxis/programming/musikcube && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
.PHONY : depend
# Convenience name for target.
src/contrib/alsaout/CMakeFiles/alsaout.dir/rule:
cd /home/urioxis/programming/musikcube && $(MAKE) -f CMakeFiles/Makefile2 src/contrib/alsaout/CMakeFiles/alsaout.dir/rule
.PHONY : src/contrib/alsaout/CMakeFiles/alsaout.dir/rule
# Convenience name for target.
alsaout: src/contrib/alsaout/CMakeFiles/alsaout.dir/rule
.PHONY : alsaout
# fast build rule for target.
alsaout/fast:
cd /home/urioxis/programming/musikcube && $(MAKE) -f src/contrib/alsaout/CMakeFiles/alsaout.dir/build.make src/contrib/alsaout/CMakeFiles/alsaout.dir/build
.PHONY : alsaout/fast
AlsaOut.o: AlsaOut.cpp.o
.PHONY : AlsaOut.o
# target to build an object file
AlsaOut.cpp.o:
cd /home/urioxis/programming/musikcube && $(MAKE) -f src/contrib/alsaout/CMakeFiles/alsaout.dir/build.make src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOut.cpp.o
.PHONY : AlsaOut.cpp.o
AlsaOut.i: AlsaOut.cpp.i
.PHONY : AlsaOut.i
# target to preprocess a source file
AlsaOut.cpp.i:
cd /home/urioxis/programming/musikcube && $(MAKE) -f src/contrib/alsaout/CMakeFiles/alsaout.dir/build.make src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOut.cpp.i
.PHONY : AlsaOut.cpp.i
AlsaOut.s: AlsaOut.cpp.s
.PHONY : AlsaOut.s
# target to generate assembly for a file
AlsaOut.cpp.s:
cd /home/urioxis/programming/musikcube && $(MAKE) -f src/contrib/alsaout/CMakeFiles/alsaout.dir/build.make src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOut.cpp.s
.PHONY : AlsaOut.cpp.s
AlsaOutBuffer.o: AlsaOutBuffer.cpp.o
.PHONY : AlsaOutBuffer.o
# target to build an object file
AlsaOutBuffer.cpp.o:
cd /home/urioxis/programming/musikcube && $(MAKE) -f src/contrib/alsaout/CMakeFiles/alsaout.dir/build.make src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOutBuffer.cpp.o
.PHONY : AlsaOutBuffer.cpp.o
AlsaOutBuffer.i: AlsaOutBuffer.cpp.i
.PHONY : AlsaOutBuffer.i
# target to preprocess a source file
AlsaOutBuffer.cpp.i:
cd /home/urioxis/programming/musikcube && $(MAKE) -f src/contrib/alsaout/CMakeFiles/alsaout.dir/build.make src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOutBuffer.cpp.i
.PHONY : AlsaOutBuffer.cpp.i
AlsaOutBuffer.s: AlsaOutBuffer.cpp.s
.PHONY : AlsaOutBuffer.s
# target to generate assembly for a file
AlsaOutBuffer.cpp.s:
cd /home/urioxis/programming/musikcube && $(MAKE) -f src/contrib/alsaout/CMakeFiles/alsaout.dir/build.make src/contrib/alsaout/CMakeFiles/alsaout.dir/AlsaOutBuffer.cpp.s
.PHONY : AlsaOutBuffer.cpp.s
alsaout_plugin.o: alsaout_plugin.cpp.o
.PHONY : alsaout_plugin.o
# target to build an object file
alsaout_plugin.cpp.o:
cd /home/urioxis/programming/musikcube && $(MAKE) -f src/contrib/alsaout/CMakeFiles/alsaout.dir/build.make src/contrib/alsaout/CMakeFiles/alsaout.dir/alsaout_plugin.cpp.o
.PHONY : alsaout_plugin.cpp.o
alsaout_plugin.i: alsaout_plugin.cpp.i
.PHONY : alsaout_plugin.i
# target to preprocess a source file
alsaout_plugin.cpp.i:
cd /home/urioxis/programming/musikcube && $(MAKE) -f src/contrib/alsaout/CMakeFiles/alsaout.dir/build.make src/contrib/alsaout/CMakeFiles/alsaout.dir/alsaout_plugin.cpp.i
.PHONY : alsaout_plugin.cpp.i
alsaout_plugin.s: alsaout_plugin.cpp.s
.PHONY : alsaout_plugin.s
# target to generate assembly for a file
alsaout_plugin.cpp.s:
cd /home/urioxis/programming/musikcube && $(MAKE) -f src/contrib/alsaout/CMakeFiles/alsaout.dir/build.make src/contrib/alsaout/CMakeFiles/alsaout.dir/alsaout_plugin.cpp.s
.PHONY : alsaout_plugin.cpp.s
# Help Target
help:
@echo "The following are some of the valid targets for this Makefile:"
@echo "... all (the default if no target is provided)"
@echo "... clean"
@echo "... depend"
@echo "... alsaout"
@echo "... edit_cache"
@echo "... rebuild_cache"
@echo "... AlsaOut.o"
@echo "... AlsaOut.i"
@echo "... AlsaOut.s"
@echo "... AlsaOutBuffer.o"
@echo "... AlsaOutBuffer.i"
@echo "... AlsaOutBuffer.s"
@echo "... alsaout_plugin.o"
@echo "... alsaout_plugin.i"
@echo "... alsaout_plugin.s"
.PHONY : help
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
cd /home/urioxis/programming/musikcube && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system

View File

@ -0,0 +1,71 @@
//////////////////////////////////////////////////////////////////////////////
//
// License Agreement:
//
// The following are Copyright © 2009, Julian Cromarty
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// * Neither the name of the author nor the names of other contributors may
// be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
//////////////////////////////////////////////////////////////////////////////
#include "pch.h"
#include <core/IPlugin.h>
#include "AlsaOut.h"
class AlsaOutPlugin : public musik::core::IPlugin
{
void Destroy() { delete this; };
const utfchar* Name() { return TEXT("AlsaOut output plugin"); };
const utfchar* Version() { return TEXT("1"); };
const utfchar* Author() { return TEXT("Julian Cromarty"); };
};
extern "C" {
musik::core::IPlugin* GetPlugin()
{
return new AlsaOutPlugin();
}
}
/*
extern "C" {
musik::core::audio::IAudioOutputSupplier* CreateAudioOutputSupplier()
{
return new AlsaOutSupplier();
}
}*/
extern "C" {
musik::core::audio::IOutput* GetAudioOutput()
{
return new AlsaOut();
}
}

View File

@ -0,0 +1,34 @@
# Install script for directory: /home/urioxis/programming/musikcube/src/contrib/alsaout
# Set the install prefix
IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
SET(CMAKE_INSTALL_PREFIX "/usr/local")
ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
# Set the install configuration name.
IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
IF(BUILD_TYPE)
STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
ELSE(BUILD_TYPE)
SET(CMAKE_INSTALL_CONFIG_NAME "DEBUG")
ENDIF(BUILD_TYPE)
MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
# Set the component getting installed.
IF(NOT CMAKE_INSTALL_COMPONENT)
IF(COMPONENT)
MESSAGE(STATUS "Install component: \"${COMPONENT}\"")
SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
ELSE(COMPONENT)
SET(CMAKE_INSTALL_COMPONENT)
ENDIF(COMPONENT)
ENDIF(NOT CMAKE_INSTALL_COMPONENT)
# Install shared libraries without execute permission?
IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
SET(CMAKE_INSTALL_SO_NO_EXE "0")
ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)

42
src/contrib/alsaout/pch.h Normal file
View File

@ -0,0 +1,42 @@
//////////////////////////////////////////////////////////////////////////////
//
// License Agreement:
//
// The following are Copyright <20> 2008, Bj<42>rn Olievier
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// * Neither the name of the author nor the names of other contributors may
// be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
//////////////////////////////////////////////////////////////////////////////
// Precompiled headers
#pragma once
#include <core/config.h>
#include <alsa/asoundlib.h>

View File

@ -0,0 +1,26 @@
set ( apedecoder_SOURCES
apedecoder_plugin.cpp
APEDecoder.cpp
APESourceSupplier.cpp
stdafx.cpp
)
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
add_definitions(-DWIN32)
if(NOT DEFINED MINGW)
endif(NOT DEFINED MINGW)
else(CMAKE_SYSTEM_NAME MATCHES "Windows")
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -fpermissive)
endif(CMAKE_SYSTEM_NAME MATCHES "Windows")
add_definitions(
-DXML_STATIC
-D_CRT_SECURE_NO_DEPRECATE
-D_DEBUG
)
add_library( apedecoder SHARED ${apedecoder_SOURCES} )
target_link_libraries( apedecoder ${musikCube_LINK_LIBS})

View File

@ -0,0 +1,25 @@
set ( bpm_analyzer_SOURCES
bpm_analyzer_plugin.cpp
BPMAnalyzer.cpp
pch.cpp
)
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
add_definitions(-DWIN32)
if(NOT DEFINED MINGW)
endif(NOT DEFINED MINGW)
else(CMAKE_SYSTEM_NAME MATCHES "Windows")
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -fpermissive)
endif(CMAKE_SYSTEM_NAME MATCHES "Windows")
add_definitions(
-DXML_STATIC
-D_CRT_SECURE_NO_DEPRECATE
-D_DEBUG
)
add_library( bpm_analyzer SHARED ${bpm_analyzer_SOURCES} )
target_link_libraries( bpm_analyzer ${musikCube_LINK_LIBS})

View File

@ -0,0 +1,25 @@
set ( dsp_example_echo_SOURCES
dsp_echo_plugin.cpp
DSPEcho.cpp
pch.cpp
)
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
add_definitions(-DWIN32)
if(NOT DEFINED MINGW)
endif(NOT DEFINED MINGW)
else(CMAKE_SYSTEM_NAME MATCHES "Windows")
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -fpermissive)
endif(CMAKE_SYSTEM_NAME MATCHES "Windows")
add_definitions(
-DXML_STATIC
-D_CRT_SECURE_NO_DEPRECATE
-D_DEBUG
)
add_library( dsp_example_echo SHARED ${dsp_example_echo_SOURCES} )
target_link_libraries( dsp_example_echo ${musikCube_LINK_LIBS})

View File

@ -0,0 +1,26 @@
set ( flacdecoder_SOURCES
FLACDecoder.cpp
FLACSourceSupplier.cpp
flacdecoder_plugin.cpp
stdafx.cpp
)
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
add_definitions(-DWIN32)
if(NOT DEFINED MINGW)
endif(NOT DEFINED MINGW)
else(CMAKE_SYSTEM_NAME MATCHES "Windows")
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -fpermissive)
endif(CMAKE_SYSTEM_NAME MATCHES "Windows")
add_definitions(
-DXML_STATIC
-D_CRT_SECURE_NO_DEPRECATE
-D_DEBUG
)
add_library( flacdecoder SHARED ${flacdecoder_SOURCES} )
target_link_libraries( flacdecoder ${musikCube_LINK_LIBS})

View File

@ -1,38 +1,41 @@
//////////////////////////////////////////////////////////////////////////////
// Copyright © 2007, mC2 team
// Copyright <EFBFBD> 2007, mC2 team
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// * Neither the name of the author nor the names of other contributors may
// be used to endorse or promote products derived from this software
// without specific prior written permission.
// * Neither the name of the author nor the names of other contributors may
// be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
//////////////////////////////////////////////////////////////////////////////
#include "StdAfx.h"
#include "stdafx.h"
#include "FLACDecoder.h"
#include <complex>
#include <complex>
#ifndef WIN32
#include <string.h> //needed for mempcpy
#endif
FLACDecoder::FLACDecoder()
:decoder(NULL)
@ -123,7 +126,7 @@ bool FLACDecoder::Open(musik::core::filestreams::IFileStream *fileStream){
if(init_status == FLAC__STREAM_DECODER_INIT_STATUS_OK) {
// Process until we have metadata
FLAC__stream_decoder_process_until_end_of_metadata(this->decoder);
return true;
return true;
}
return false;
@ -161,7 +164,9 @@ FLAC__StreamDecoderWriteStatus FLACDecoder::FlacWrite(const FLAC__StreamDecoder
if(thisPtr->outputBuffer && thisPtr->outputBufferSize>0){
float *oldBuffer = thisPtr->outputBuffer;
thisPtr->outputBuffer = new float[nofSamples+thisPtr->outputBufferSize];
CopyMemory(thisPtr->outputBuffer, oldBuffer, thisPtr->outputBufferSize * sizeof(float));
#ifdef WIN32 CopyMemory(thisPtr->outputBuffer, oldBuffer, thisPtr->outputBufferSize * sizeof(float));
#else /*GNU*/ mempcpy(thisPtr->outputBuffer, oldBuffer, thisPtr->outputBufferSize * sizeof(float));
#endif //WIN32
delete oldBuffer;
}
@ -216,7 +221,7 @@ double FLACDecoder::SetPosition(double seconds,double totalLength){
//bool FLACDecoder::GetBuffer(float ** ppBuffer, unsigned long * NumSamples){
bool FLACDecoder::GetBuffer(IBuffer *buffer){
buffer->SetSampleRate(this->sampleRate);
buffer->SetChannels(this->channels);

View File

@ -1,39 +1,39 @@
//////////////////////////////////////////////////////////////////////////////
// Copyright © 2007, mC2 team
// Copyright <EFBFBD> 2007, mC2 team
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// * Neither the name of the author nor the names of other contributors may
// be used to endorse or promote products derived from this software
// without specific prior written permission.
// * Neither the name of the author nor the names of other contributors may
// be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
//////////////////////////////////////////////////////////////////////////////
#pragma once
#include <core/audio/IDecoder.h>
#include "FLAC/stream_decoder.h"
#include <FLAC/stream_decoder.h>
#include <stddef.h>
@ -42,11 +42,11 @@ using namespace musik::core::audio;
class FLACDecoder : public IDecoder
{
public:
public:
FLACDecoder();
~FLACDecoder();
public:
public:
virtual void Destroy();
virtual double SetPosition(double seconds,double totalLength);
virtual bool GetBuffer(IBuffer *buffer);
@ -71,7 +71,7 @@ public:
static void FlacError(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorStatus status, void *clientData);
protected:
protected:
musik::core::filestreams::IFileStream *fileStream;
FLAC__StreamDecoder *decoder;

View File

@ -2,7 +2,7 @@
//
// License Agreement:
//
// The following are Copyright © 2008, Daniel Önnerby
// The following are Copyright <EFBFBD> 2008, Daniel <20>nnerby
//
// All rights reserved.
//
@ -40,10 +40,12 @@
#include "FLACSourceSupplier.h"
#ifdef WIN32
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
return true;
}
#endif //WIN32
class FLACDecoderPlugin : public musik::core::IPlugin
{
@ -51,15 +53,31 @@ class FLACDecoderPlugin : public musik::core::IPlugin
const utfchar* Name() { return TEXT("FLAC decoder"); };
const utfchar* Version() { return TEXT("1"); };
const utfchar* Author() { return TEXT("Daniel Önnerby"); };
const utfchar* Author() { return TEXT("Daniel <EFBFBD>nnerby"); };
};
extern "C" __declspec(dllexport) musik::core::IPlugin* GetPlugin()
#ifdef WIN32
extern "C" __declspec(dllexport)
#else //WIN32
extern "C" {
#endif //WIN32
musik::core::IPlugin* GetPlugin()
{
return new FLACDecoderPlugin();
}
#ifndef WIN32
}
#endif
extern "C" __declspec(dllexport) IDecoderFactory* GetDecoderFactory()
#ifdef WIN32
extern "C" __declspec(dllexport)
#else //WIN32
extern "C" {
#endif //WIN32
IDecoderFactory* GetDecoderFactory()
{
return new FLACSourceSupplier();
}
#ifndef WIN32
}
#endif

View File

@ -7,4 +7,6 @@
#include <core/config.h>
#ifdef WIN32
#include "vld/vld.h"
#endif //WIN32

View File

@ -0,0 +1,27 @@
set ( httpstream_SOURCES
httpstream_plugin.cpp
HTTPRequest.cpp
HTTPStream.cpp
HTTPStreamFactory.cpp
stdafx.cpp
)
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
add_definitions(-DWIN32)
if(NOT DEFINED MINGW)
endif(NOT DEFINED MINGW)
else(CMAKE_SYSTEM_NAME MATCHES "Windows")
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -fpermissive)
endif(CMAKE_SYSTEM_NAME MATCHES "Windows")
add_definitions(
-DXML_STATIC
-D_CRT_SECURE_NO_DEPRECATE
-D_DEBUG
)
add_library( httpstream SHARED ${httpstream_SOURCES} )
target_link_libraries( httpstream ${musikCube_LINK_LIBS})

View File

@ -0,0 +1,26 @@
set ( mpg123decoder_SOURCES
mp3decoder_plugin.cpp
MP3Decoder.cpp
MP3SourceSupplier.cpp
stdafx.cpp
)
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
add_definitions(-DWIN32)
if(NOT DEFINED MINGW)
endif(NOT DEFINED MINGW)
else(CMAKE_SYSTEM_NAME MATCHES "Windows")
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -fpermissive)
endif(CMAKE_SYSTEM_NAME MATCHES "Windows")
add_definitions(
-DXML_STATIC
-D_CRT_SECURE_NO_DEPRECATE
-D_DEBUG
)
add_library( mpg123decoder SHARED ${mpg123decoder_SOURCES} )
target_link_libraries( mpg123decoder ${musikCube_LINK_LIBS})

View File

@ -1,37 +1,37 @@
//////////////////////////////////////////////////////////////////////////////
// Copyright © 2007, Daniel Önnerby
// Copyright <EFBFBD> 2007, Daniel <20>nnerby
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// * Neither the name of the author nor the names of other contributors may
// be used to endorse or promote products derived from this software
// without specific prior written permission.
// * Neither the name of the author nor the names of other contributors may
// be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
//////////////////////////////////////////////////////////////////////////////
#include "MP3decoder.h"
#include "MP3Decoder.h"
#define MP3_IN_BUFFSIZE 4096
@ -131,7 +131,7 @@ bool MP3Decoder::GetBuffer(IBuffer *buffer){
this->sampleSize = this->cachedChannels*sizeof(float);
// Format should not change
mpg123_format_none(this->decoder);
mpg123_format_none(this->decoder);
// Force the encoding to float32
int e=mpg123_format(this->decoder,this->cachedRate,this->cachedChannels,MPG123_ENC_FLOAT_32);

View File

@ -1,39 +1,39 @@
//////////////////////////////////////////////////////////////////////////////
// Copyright © 2007, Daniel Önnerby
// Copyright <EFBFBD> 2007, Daniel <20>nnerby
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// * Neither the name of the author nor the names of other contributors may
// be used to endorse or promote products derived from this software
// without specific prior written permission.
// * Neither the name of the author nor the names of other contributors may
// be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
//////////////////////////////////////////////////////////////////////////////
#pragma once
#include <core/audio/IDecoder.h>
#include "mpg123.h"
#include <mpg123.h>
//#include <boost/thread/mutex.hpp>
#define STREAM_FEED_SIZE 1024

View File

@ -2,7 +2,7 @@
//
// License Agreement:
//
// The following are Copyright © 2008, Daniel Önnerby
// The following are Copyright <EFBFBD> 2008, Daniel <20>nnerby
//
// All rights reserved.
//
@ -40,10 +40,12 @@
#include "MP3SourceSupplier.h"
#ifdef WIN32
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
return true;
}
#endif
class MP3DecoderPlugin : public musik::core::IPlugin
{
@ -51,15 +53,31 @@ class MP3DecoderPlugin : public musik::core::IPlugin
const utfchar* Name() { return TEXT("mpg123 decoder"); };
const utfchar* Version() { return TEXT("1"); };
const utfchar* Author() { return TEXT("Daniel Önnerby"); };
const utfchar* Author() { return TEXT("Daniel <EFBFBD>nnerby"); };
};
extern "C" __declspec(dllexport) musik::core::IPlugin* GetPlugin()
#ifdef WIN32
extern "C" __declspec(dllexport)
#else
extern "C" {
#endif
musik::core::IPlugin* GetPlugin()
{
return new MP3DecoderPlugin();
}
#ifndef WIN32
}
#endif
extern "C" __declspec(dllexport) IDecoderFactory* GetDecoderFactory()
#ifdef WIN32
extern "C" __declspec(dllexport)
#else
extern "C" {
#endif
IDecoderFactory* GetDecoderFactory()
{
return new MP3SourceSupplier();
}
#ifndef WIN32
}
#endif

View File

@ -7,7 +7,9 @@
#include <core/config.h>
#include <shlwapi.h>
#include <math.h>
#ifdef WIN32
#include <shlwapi.h>
#include "vld/vld.h"
#endif //WIN32

View File

@ -0,0 +1,26 @@
set ( oggdecoder_SOURCES
oggdecoder_plugin.cpp
OGGDecoder.cpp
OggSourceSupplier.cpp
stdafx.cpp
)
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
add_definitions(-DWIN32)
if(NOT DEFINED MINGW)
endif(NOT DEFINED MINGW)
else(CMAKE_SYSTEM_NAME MATCHES "Windows")
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -fpermissive)
endif(CMAKE_SYSTEM_NAME MATCHES "Windows")
add_definitions(
-DXML_STATIC
-D_CRT_SECURE_NO_DEPRECATE
-D_DEBUG
)
add_library( oggdecoder SHARED ${oggdecoder_SOURCES} )
target_link_libraries( oggdecoder ${musikCube_LINK_LIBS})

View File

@ -0,0 +1,25 @@
set ( taglib_plugin_SOURCES
taglib_plugin.cpp
TagReaderTaglib.cpp
stdafx.cpp
)
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
add_definitions(-DWIN32)
if(NOT DEFINED MINGW)
endif(NOT DEFINED MINGW)
else(CMAKE_SYSTEM_NAME MATCHES "Windows")
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -fpermissive)
endif(CMAKE_SYSTEM_NAME MATCHES "Windows")
add_definitions(
-DXML_STATIC
-D_CRT_SECURE_NO_DEPRECATE
-D_DEBUG
)
add_library( taglib_plugin SHARED ${taglib_plugin_SOURCES} )
target_link_libraries( taglib_plugin ${musikCube_LINK_LIBS})

View File

@ -2,7 +2,7 @@
//
// License Agreement:
//
// The following are Copyright © 2008, Daniel Önnerby
// The following are Copyright <EFBFBD> 2008, Daniel <20>nnerby
//
// All rights reserved.
//
@ -36,6 +36,7 @@
#include "TagReaderTaglib.h"
#ifndef _HAVE_TAGLIB
#include <toolkit/tlist.h>
#include <toolkit/tfile.h>
@ -55,6 +56,27 @@
#include <mpeg/id3v2/frames/commentsframe.h>
#include <taglib/ogg/oggfile.h>
#else //_HAVE_TAGLIB
#include <taglib/tlist.h>
#include <taglib/tfile.h>
#include <taglib/tag.h>
#include <taglib/fileref.h>
#include <taglib/audioproperties.h>
#include <taglib/mpegfile.h>
#include <taglib/id3v1tag.h>
#include <taglib/id3v1genres.h>
#include <taglib/id3v2tag.h>
#include <taglib/id3v2header.h>
#include <taglib/id3v2frame.h>
#include <taglib/attachedpictureframe.h>
#include <taglib/commentsframe.h>
#include <taglib/oggfile.h>
#endif //_HAVE_TAGLIB
#include <vector>
#include <boost/format.hpp>
@ -102,7 +124,7 @@ bool TagReaderTaglib::ReadTag(musik::core::ITrack *track){
if(extension){
utfstring ext(extension);
boost::algorithm::to_lower(ext); // Convert to lower case
if(ext==UTF("mp3"))
if(this->GetID3v2Tag(track)){
// Get the generic tag as well, just in case there is only a id3v1 tag.
@ -205,7 +227,8 @@ bool TagReaderTaglib::GetID3v2Tag(musik::core::ITrack *track){
// Split TRCK to track and totaltracks
std::vector<utfstring> splitTrack;
if(!aAllTags["TRCK"].isEmpty()){
boost::algorithm::split(splitTrack,aAllTags["TRCK"].front()->toString().toWString(),boost::algorithm::is_any_of(_T("/")));
TagLib::wstring tempTrack = aAllTags["TRCK"].front()->toString().toWString();
boost::algorithm::split(splitTrack,tempTrack,boost::algorithm::is_any_of(UTF("/")));
this->SetTagValue("track",splitTrack[0].c_str(),track);
if(splitTrack.size()>1){
this->SetTagValue("totaltracks",splitTrack[1].c_str(),track);
@ -293,9 +316,9 @@ bool TagReaderTaglib::GetID3v2Tag(musik::core::ITrack *track){
if(description.empty()){
this->SetTagValue("comment",comment->toString(),track);
}else if(description==_T("MusicMatch_Mood")){
}else if(strcmp(UTF16_TO_UTF(description).c_str(), "MusicMatch_Mood") == 0){
this->SetTagValue("mood",comment->toString(),track);
}else if(description==_T("MusicMatch_Preference")){
}else if(strcmp(UTF16_TO_UTF(description).c_str(),"MusicMatch_Preference") == 0){
this->SetTagValue("textrating",comment->toString(),track);
}
}
@ -339,17 +362,17 @@ bool TagReaderTaglib::GetID3v2Tag(musik::core::ITrack *track){
void TagReaderTaglib::SetTagValue(const char* key,const TagLib::String tagString,musik::core::ITrack *track){
using namespace musik::core;
std::wstring value(tagString.begin(),tagString.end());
track->SetValue(key,value.c_str());
track->SetValue(key,UTF16_TO_UTF(value).c_str());
}
void TagReaderTaglib::SetTagValue(const char* key,const wchar_t* string,musik::core::ITrack *track){
using namespace musik::core;
track->SetValue(key,string);
track->SetValue(key,UTF16_TO_UTF(string).c_str());
}
void TagReaderTaglib::SetTagValue(const char* key,const int tagInt,musik::core::ITrack *track){
std::wstring temp = boost::str(boost::wformat(_T("%1%"))%tagInt);
track->SetValue(key,temp.c_str());
std::wstring temp = boost::str(boost::wformat(UTF_TO_UTF16("%1%"))%tagInt);
track->SetValue(key,UTF16_TO_UTF(temp).c_str());
}
@ -360,7 +383,7 @@ void TagReaderTaglib::SetTagValues(const char* key,const TagLib::ID3v2::FrameLis
TagLib::String tagString = (*value)->toString();
if( !tagString.isEmpty() ){
std::wstring value(tagString.begin(),tagString.end());
track->SetValue(key,value.c_str());
track->SetValue(key,UTF16_TO_UTF(value).c_str());
}
}
}
@ -383,15 +406,15 @@ bool TagReaderTaglib::getStandardTags(musik::core::ITrack &track,TagLib::Tag *oT
return true;
}
*/
void TagReaderTaglib::SetSlashSeparatedValues(const char* key,TagLib::String &tagString,musik::core::ITrack *track){
void TagReaderTaglib::SetSlashSeparatedValues(const char* key,TagLib::String tagString,musik::core::ITrack *track){
if( !tagString.isEmpty() ){
std::wstring value(tagString.begin(),tagString.end());
std::vector<std::wstring> splitValues;
boost::algorithm::split(splitValues,value,boost::algorithm::is_any_of(_T("/")));
boost::algorithm::split(splitValues,value,boost::algorithm::is_any_of(UTF("/")));
for(std::vector<std::wstring>::iterator theValue=splitValues.begin();theValue!=splitValues.end();++theValue){
track->SetValue(key,theValue->c_str());
track->SetValue(key,UTF16_TO_UTF(theValue->c_str()).c_str());
}
}
}
@ -418,18 +441,18 @@ void TagReaderTaglib::SetSlashSeparatedValues(const char* key,const TagLib::ID3v
void TagReaderTaglib::SetAudioProperties(TagLib::AudioProperties *audioProperties,musik::core::ITrack *track){
if(audioProperties){
std::wstring duration = boost::str(boost::wformat(_T("%1%"))%audioProperties->length());
std::wstring duration = boost::str(boost::wformat(UTF_TO_UTF16("%1%"))%audioProperties->length());
this->SetTagValue("duration",duration,track);
int bitrate( audioProperties->bitrate() );
if(bitrate){
std::wstring temp( boost::str(boost::wformat(_T("%1%"))%bitrate ) );
std::wstring temp( boost::str(boost::wformat(UTF_TO_UTF16("%1%"))%bitrate ) );
this->SetTagValue("bitrate",temp,track);
}
int channels( audioProperties->channels() );
if(channels){
std::wstring temp( boost::str(boost::wformat(_T("%1%"))%channels ) );
std::wstring temp( boost::str(boost::wformat(UTF_TO_UTF16("%1%"))%channels ) );
this->SetTagValue("channels",temp,track);
}
}

View File

@ -2,7 +2,7 @@
//
// License Agreement:
//
// The following are Copyright © 2008, Daniel Önnerby
// The following are Copyright <EFBFBD> 2008, Daniel <20>nnerby
//
// All rights reserved.
//
@ -38,6 +38,7 @@
#include "stdafx.h"
#ifndef _HAVE_TAGLIB
#include <toolkit/tlist.h>
#include <toolkit/tfile.h>
@ -46,11 +47,22 @@
#include <taglib/audioproperties.h>
#include <mpeg/id3v2/id3v2tag.h>
#else //_HAVE_TAGLIB
#include <taglib/tlist.h>
#include <taglib/tfile.h>
#include <taglib/tag.h>
#include <taglib/fileref.h>
#include <taglib/audioproperties.h>
#include <taglib/id3v2tag.h>
#endif //_HAVE_TAGLIB
#include <set>
#include <core/Plugin/IMetaDataReader.h>
#include <core/Common.h>
class TagReaderTaglib : public musik::core::Plugin::IMetaDataReader {
public:
@ -69,7 +81,7 @@ class TagReaderTaglib : public musik::core::Plugin::IMetaDataReader {
void SetAudioProperties(TagLib::AudioProperties *audioProperties,musik::core::ITrack *track);
void SetSlashSeparatedValues(const char* key,const TagLib::ID3v2::FrameList &frame,musik::core::ITrack *track);
void SetSlashSeparatedValues(const char* key,TagLib::String &tagString,musik::core::ITrack *track);
void SetSlashSeparatedValues(const char* key,TagLib::String tagString,musik::core::ITrack *track);
bool GetID3v2Tag(musik::core::ITrack *track);
bool GetGenericTag(musik::core::ITrack *track);

View File

@ -5,15 +5,16 @@
#pragma once
#ifdef WIN32
// Modify the following defines if you have to target a platform prior to the ones specified below.
// Refer to MSDN for the latest info on corresponding values for different platforms.
#ifndef WINVER // Allow use of features specific to Windows XP or later.
#define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows.
#endif
#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later.
#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later.
#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
#endif
#endif
#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
@ -28,3 +29,4 @@
#include <windows.h>
#include "vld/vld.h"
#endif //WIN32

View File

@ -2,7 +2,7 @@
//
// License Agreement:
//
// The following are Copyright © 2008, Daniel Önnerby
// The following are Copyright <EFBFBD> 2008, Daniel <20>nnerby
//
// All rights reserved.
//
@ -38,9 +38,17 @@
#include "stdafx.h"
#include "TagReaderTaglib.h"
#include "core/IPlugin.h"
#ifndef _HAVE_TAGLIB
#include <id3v2framefactory.h>
#else
#include <taglib/id3v2framefactory.h>
#endif
#ifdef WIN32
#define DLLEXPORT __declspec(dllexport)
#else
#define DLLEXPORT
#endif
//////////////////////////////////////////
@ -54,7 +62,7 @@ class TaglibBugFix : TagLib::ID3v2::FrameFactory{
};
};
#ifdef WIN32
BOOL APIENTRY DllMain( HMODULE hModule,DWORD ul_reason_for_call,LPVOID lpReserved){
if(ul_reason_for_call==DLL_PROCESS_DETACH){
TaglibBugFix *ff = (TaglibBugFix*)TagLib::ID3v2::FrameFactory::instance();
@ -62,6 +70,7 @@ BOOL APIENTRY DllMain( HMODULE hModule,DWORD ul_reason_for_call,LPVOID lpReserv
}
return TRUE;
}
#endif //WIN32
//TagReaderTaglib tagreader;
@ -69,16 +78,16 @@ class TaglibPlugin : public musik::core::IPlugin
{
void Destroy() { delete this; };
const wchar_t* Name(){
return _T("Taglib 1.5 plugin");
const utfchar* Name(){
return UTF("Taglib 1.5 plugin");
};
const wchar_t* Version(){
return _T("0.1");
const utfchar* Version(){
return UTF("0.1");
};
const wchar_t* Author(){
return _T("Daniel Önnerby");
const utfchar* Author(){
return UTF("Daniel <20>nnerby");
};
};

View File

@ -0,0 +1,28 @@
set ( waveout_SOURCES
WaveOut.cpp
WaveOutBuffer.cpp
pch.cpp
waveout_plugin.cpp
)
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
add_definitions(-DWIN32)
if(NOT DEFINED MINGW)
endif(NOT DEFINED MINGW)
else(CMAKE_SYSTEM_NAME MATCHES "Windows")
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -fpermissive)
endif(CMAKE_SYSTEM_NAME MATCHES "Windows")
add_definitions(
-DXML_STATIC
-D_CRT_SECURE_NO_DEPRECATE
-D_DEBUG
)
#include_directories( ../../core )
add_library( waveout SHARED ${waveout_SOURCES} )
target_link_libraries( waveout ${musikCube_LINK_LIBS})

View File

@ -34,7 +34,11 @@
#include <core/audio/IBuffer.h>
#include <core/audio/IPlayer.h>
#include "Mmsystem.h"
#ifdef WIN32
#include "Mmsystem.h"
#else
#include <alsa/asoundlib.h>
#endif
//////////////////////////////////////////////////////////////////////////////
// Forward declare
class WaveOut;

View File

@ -39,9 +39,16 @@
#include <core/config.h>
#include <mmsystem.h>
#include <mmreg.h>
#include <ks.h>
#include <ksmedia.h>
#ifdef WIN32
#include <mmsystem.h>
#include <mmreg.h>
#include <ks.h>
#include <ksmedia.h>
#include "vld/vld.h"
#include "vld/vld.h"
#else
#include <alsa/asoundlib.h>
#endif //WIN32

View File

@ -2,7 +2,7 @@
//
// License Agreement:
//
// The following are Copyright © 2008, Björn Olievier
// The following are Copyright <EFBFBD> 2008, Bj<42>rn Olievier
//
// All rights reserved.
//
@ -39,7 +39,6 @@
#include <core/IPlugin.h>
#include "WaveOut.h"
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
return true;
@ -51,7 +50,7 @@ class WaveOutPlugin : public musik::core::IPlugin
const utfchar* Name() { return TEXT("WaveOut output plugin"); };
const utfchar* Version() { return TEXT("1"); };
const utfchar* Author() { return TEXT("Björn Olievier"); };
const utfchar* Author() { return TEXT("Bj<EFBFBD>rn Olievier"); };
};
extern "C" __declspec(dllexport) musik::core::IPlugin* GetPlugin()

View File

@ -36,7 +36,6 @@ set(CORE_SOURCES
audio/Stream.cpp
audio/Transport.cpp
server/Connection.cpp
Server.cpp
server/User.cpp
server/UserSession.cpp
xml/Node.cpp
@ -56,6 +55,8 @@ set(CORE_SOURCES
LibraryTrack.cpp
Track.cpp
TrackFactory.cpp
Server.cpp
Server.h
)
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
@ -71,7 +72,6 @@ include_directories(
..
../3rdparty/include
../3rdparty/include/jpeg-6b
)
add_definitions(
@ -80,5 +80,7 @@ add_definitions(
-D_DEBUG
)
add_library( core SHARED ${CORE_SOURCES} )
add_library( musik SHARED ${CORE_SOURCES} )
target_link_libraries( musik ${musikCube_LINK_LIBS})

View File

@ -2,7 +2,7 @@
//
// License Agreement:
//
// The following are Copyright © 2008, Daniel Önnerby
// The following are Copyright <EFBFBD> 2008, Daniel <20>nnerby
//
// All rights reserved.
//
@ -49,13 +49,17 @@ PluginFactory::PluginFactory(void){
}
PluginFactory::~PluginFactory(void){
for (size_t i=0; i<this->loadedPlugins.size(); ++i)
{
this->loadedPlugins[i]->Destroy();
}
this->loadedPlugins.clear();
//this->loadedPlugins.clear(); //This causes a segmentation fault on linux due to loadedPlugins being already empty. Jooles
//Also somewhere here is another seg fault that only seems to occur when the program is run from within its directory
//eg. cd'ing to musikCube/bin and running square then quitting segfaults here. cd'ing to musikCube and running
// bin/square then quitting works fine.. Any ideas anyone? Jooles
#ifdef _DEBUG
std::cerr << "Unloading DLLs" << std::endl;
#endif
// Unload dlls
for(std::vector<void*>::iterator oDLL=this->loadedDLLs.begin();oDLL!=this->loadedDLLs.end();){
#ifdef WIN32
@ -109,12 +113,16 @@ void PluginFactory::LoadPlugins(){
char* err;
if ((err = dlerror()) != NULL) {
std::cerr << "Couldn't open shared library " << sFile << std::endl;
std::cerr << "Error: " << err << std::endl;
}
else {
IPlugin* getPluginCall = (IPlugin*)dlsym(oDLL,"GetPlugin");
if(getPluginCall){
this->loadedPlugins.push_back(getPluginCall);
IPlugin* getPluginCall = (IPlugin*)dlsym(oDLL,"GetPlugin");
if(getPluginCall){
this->loadedPlugins.push_back(getPluginCall);
this->loadedDLLs.push_back(oDLL);
#ifdef _DEBUG
std::cout << "Shared library " << sFile.c_str() << " loaded and opened." << std::endl;
#endif
}
else {
dlclose(oDLL);

View File

@ -2,7 +2,7 @@
//
// License Agreement:
//
// The following are Copyright © 2008, Daniel Önnerby
// The following are Copyright <EFBFBD> 2008, Daniel <20>nnerby
//
// All rights reserved.
//
@ -105,23 +105,20 @@ namespace musik{ namespace core{
Iterator currentDll = allDlls.begin();
while (currentDll != allDlls.end()){
PluginInterfaceCall funcPtr =
PluginInterfaceCall funcPtr =
#ifdef WIN32
(PluginInterfaceCall) GetProcAddress((HMODULE)(*currentDll), functionName);
#else
(PluginInterfaceCall) dlsym(*currentDll, functionName);
(PluginInterfaceCall) dlsym(*currentDll, functionName);
#endif //WIN32
if(funcPtr) {
T* result = funcPtr();
if (result) {
plugins.push_back(boost::shared_ptr<T>(result, D()));
}
}
currentDll++;
if(funcPtr) {
T* result = funcPtr();
if (result) {
plugins.push_back(boost::shared_ptr<T>(result, D()));
}
}
currentDll++;
}
return plugins;
}

View File

@ -1,33 +1,33 @@
//////////////////////////////////////////////////////////////////////////////
// Copyright © 2007, Daniel Önnerby
// Copyright <EFBFBD> 2007, Daniel <20>nnerby
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// * Neither the name of the author nor the names of other contributors may
// be used to endorse or promote products derived from this software
// without specific prior written permission.
// * Neither the name of the author nor the names of other contributors may
// be used to endorse or promote products derived from this software
// without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
//////////////////////////////////////////////////////////////////////////////
#pragma once
@ -42,13 +42,13 @@ namespace musik { namespace core { namespace audio {
class IDecoder{
public:
public:
//////////////////////////////////////////
///\brief
///Destroy the object
///
///The Destroy method is used so that it's guaranteed that the object is
///The Destroy method is used so that it's guaranteed that the object is
///destroyed inside the right DLL/exe
//////////////////////////////////////////
virtual void Destroy() = 0;
@ -64,7 +64,7 @@ class IDecoder{
///Set the position in the source (in seconds)
///
///\returns
///The acctual position set
///The actual position set
//////////////////////////////////////////
virtual double SetPosition(double seconds,double totalLength) = 0;

View File

@ -62,8 +62,9 @@
typedef unsigned long long UINT64;
typedef long long __int64; //TODO: Is this necessary?
#define STDCALL(fp) fp __attribute__((stdcall))
#define STDCALL(fp) fp __attribute__((stdcall))
#define _ASSERT assert
#define TEXT(s) s //There's no TEXT() on linux. This makes the current uses of it compile for me... Jooles
#endif // WIN32
@ -137,13 +138,13 @@ typedef unsigned int DBTIME;
///\brief
///utfstringstream is the stringstream for utfchar & utfstring
//////////////////////////////////////////
/* namespace std
namespace std
{
typedef stringstream utfstringstream;
typedef ostringstream utfostringstream;
typedef istringstream utfistringstream;
}
*/
#endif
typedef std::basic_string<utfchar> utfstring;

View File

@ -0,0 +1,9 @@
set (SQUARE_SRCS
stdafx.cpp
player.cpp
DummyAudioEventHandler.cpp
ConsoleUI.cpp
)
add_executable(square ${SQUARE_SRCS})
target_link_libraries(square ${musikCube_LINK_LIBS} musik)