mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
Some code cleanup
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2768 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
+20
-70
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9,00"
|
||||
Version="9.00"
|
||||
Name="Bochs_disasm"
|
||||
ProjectGUID="{29C2ABC1-ADA5-42CD-A5FC-96022D52A510}"
|
||||
RootNamespace="Bochs_disasm"
|
||||
@@ -44,15 +44,16 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE=1;WIN32_LEAN_AND_MEAN"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
WarnAsError="false"
|
||||
DebugInformationFormat="4"
|
||||
ForcedIncludeFiles="stdafx.h"
|
||||
ForcedUsingFiles=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -108,15 +109,16 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE=1;WIN32_LEAN_AND_MEAN"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
WarnAsError="false"
|
||||
DebugInformationFormat="3"
|
||||
ForcedIncludeFiles="stdafx.h"
|
||||
ForcedUsingFiles=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -172,13 +174,14 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
WholeProgramOptimization="false"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE=1;WIN32_LEAN_AND_MEAN"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
WarnAsError="false"
|
||||
DebugInformationFormat="3"
|
||||
ForcedIncludeFiles="stdafx.h"
|
||||
ForcedUsingFiles=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -237,13 +240,14 @@
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="2"
|
||||
WholeProgramOptimization="false"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE=1;WIN32_LEAN_AND_MEAN"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
WarnAsError="false"
|
||||
DebugInformationFormat="3"
|
||||
ForcedIncludeFiles="stdafx.h"
|
||||
ForcedIncludeFiles=""
|
||||
ForcedUsingFiles=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -299,13 +303,14 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
WholeProgramOptimization="false"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE=1;WIN32_LEAN_AND_MEAN"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
WarnAsError="false"
|
||||
DebugInformationFormat="3"
|
||||
ForcedIncludeFiles="stdafx.h"
|
||||
ForcedUsingFiles=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -364,13 +369,14 @@
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="2"
|
||||
WholeProgramOptimization="false"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE=1;WIN32_LEAN_AND_MEAN"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
WarnAsError="false"
|
||||
DebugInformationFormat="3"
|
||||
ForcedIncludeFiles="stdafx.h"
|
||||
ForcedUsingFiles=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -444,62 +450,6 @@
|
||||
RelativePath=".\resolve.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\stdafx.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DebugFast|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DebugFast|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\stdafx.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\syntax.cpp"
|
||||
>
|
||||
|
||||
Vendored
-8
@@ -1,8 +0,0 @@
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// Bochs_disasm.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: reference any additional headers you need in STDAFX.H
|
||||
// and not in this file
|
||||
Vendored
-18
@@ -1,18 +0,0 @@
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
#define _CRT_SECURE_NO_DEPRECATE 1
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
|
||||
// TODO: reference additional headers your program requires here
|
||||
@@ -15,8 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef __AOSOUNDSTREAM_H__
|
||||
#define __AOSOUNDSTREAM_H__
|
||||
#ifndef _AOSOUNDSTREAM_H_
|
||||
#define _AOSOUNDSTREAM_H_
|
||||
|
||||
#include "SoundStream.h"
|
||||
|
||||
@@ -69,4 +69,4 @@ public:
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif //__AOSOUNDSTREAM_H__
|
||||
#endif //_AOSOUNDSTREAM_H_
|
||||
|
||||
@@ -1,87 +1,104 @@
|
||||
#include "AudioCommon.h"
|
||||
#include "Mixer.h"
|
||||
#include "AOSoundStream.h"
|
||||
#include "DSoundStream.h"
|
||||
#include "NullSoundStream.h"
|
||||
#include "OpenALStream.h"
|
||||
|
||||
namespace AudioCommon {
|
||||
|
||||
SoundStream *InitSoundStream(std::string backend, CMixer *mixer) {
|
||||
|
||||
if (!mixer) {
|
||||
mixer = new CMixer();
|
||||
}
|
||||
|
||||
if (backend == "DSound") {
|
||||
if (DSound::isValid())
|
||||
soundStream = new DSound(mixer, g_dspInitialize.hWnd);
|
||||
}
|
||||
else if (backend == "AOSound") {
|
||||
if (AOSound::isValid())
|
||||
soundStream = new AOSound(mixer);
|
||||
}
|
||||
else if (backend == "OpenAL") {
|
||||
if (OpenALStream::isValid())
|
||||
soundStream = new OpenALStream(mixer);
|
||||
}
|
||||
else if (backend == "NullSound") {
|
||||
soundStream = new NullSound(mixer);
|
||||
}
|
||||
else {
|
||||
PanicAlert("Cannot recognize backend %s", backend.c_str());
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (soundStream) {
|
||||
if (!soundStream->Start()) {
|
||||
PanicAlert("Could not initialize backend %s, falling back to NULL",
|
||||
backend.c_str());
|
||||
delete soundStream;
|
||||
soundStream = new NullSound(mixer);
|
||||
soundStream->Start();
|
||||
}
|
||||
}
|
||||
else {
|
||||
PanicAlert("Sound backend %s is not valid, falling back to NULL",
|
||||
backend.c_str());
|
||||
delete soundStream;
|
||||
soundStream = new NullSound(mixer);
|
||||
soundStream->Start();
|
||||
}
|
||||
return soundStream;
|
||||
}
|
||||
|
||||
void ShutdownSoundStream() {
|
||||
NOTICE_LOG(DSPHLE, "Shutting down sound stream");
|
||||
|
||||
if (soundStream) {
|
||||
soundStream->Stop();
|
||||
soundStream->StopLogAudio();
|
||||
delete soundStream;
|
||||
soundStream = NULL;
|
||||
}
|
||||
|
||||
// Check that soundstream already is stopped.
|
||||
while (soundStream) {
|
||||
ERROR_LOG(DSPHLE, "Waiting for sound stream");
|
||||
Common::SleepCurrentThread(2000);
|
||||
}
|
||||
INFO_LOG(DSPHLE, "Done shutting down sound stream");
|
||||
}
|
||||
|
||||
std::vector<std::string> GetSoundBackends() {
|
||||
std::vector<std::string> backends;
|
||||
// Add avaliable output options
|
||||
if (DSound::isValid())
|
||||
backends.push_back("DSound");
|
||||
if (AOSound::isValid())
|
||||
backends.push_back("AOSound");
|
||||
if (OpenALStream::isValid())
|
||||
backends.push_back("OpenAL");
|
||||
backends.push_back("NullSound");
|
||||
|
||||
return backends;
|
||||
}
|
||||
|
||||
} // Namespace
|
||||
// Copyright (C) 2003-2009 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program 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 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include "AudioCommon.h"
|
||||
#include "Mixer.h"
|
||||
#include "AOSoundStream.h"
|
||||
#include "DSoundStream.h"
|
||||
#include "NullSoundStream.h"
|
||||
#include "OpenALStream.h"
|
||||
|
||||
namespace AudioCommon
|
||||
{
|
||||
SoundStream *InitSoundStream(std::string backend, CMixer *mixer) {
|
||||
|
||||
if (!mixer) {
|
||||
mixer = new CMixer();
|
||||
}
|
||||
|
||||
if (backend == "DSound") {
|
||||
if (DSound::isValid())
|
||||
soundStream = new DSound(mixer, g_dspInitialize.hWnd);
|
||||
}
|
||||
else if (backend == "AOSound") {
|
||||
if (AOSound::isValid())
|
||||
soundStream = new AOSound(mixer);
|
||||
}
|
||||
else if (backend == "OpenAL") {
|
||||
if (OpenALStream::isValid())
|
||||
soundStream = new OpenALStream(mixer);
|
||||
}
|
||||
else if (backend == "NullSound") {
|
||||
soundStream = new NullSound(mixer);
|
||||
}
|
||||
else {
|
||||
PanicAlert("Cannot recognize backend %s", backend.c_str());
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (soundStream) {
|
||||
if (!soundStream->Start()) {
|
||||
PanicAlert("Could not initialize backend %s, falling back to NULL",
|
||||
backend.c_str());
|
||||
delete soundStream;
|
||||
soundStream = new NullSound(mixer);
|
||||
soundStream->Start();
|
||||
}
|
||||
}
|
||||
else {
|
||||
PanicAlert("Sound backend %s is not valid, falling back to NULL",
|
||||
backend.c_str());
|
||||
delete soundStream;
|
||||
soundStream = new NullSound(mixer);
|
||||
soundStream->Start();
|
||||
}
|
||||
return soundStream;
|
||||
}
|
||||
|
||||
void ShutdownSoundStream() {
|
||||
NOTICE_LOG(DSPHLE, "Shutting down sound stream");
|
||||
|
||||
if (soundStream) {
|
||||
soundStream->Stop();
|
||||
soundStream->StopLogAudio();
|
||||
delete soundStream;
|
||||
soundStream = NULL;
|
||||
}
|
||||
|
||||
// Check that soundstream already is stopped.
|
||||
while (soundStream) {
|
||||
ERROR_LOG(DSPHLE, "Waiting for sound stream");
|
||||
Common::SleepCurrentThread(2000);
|
||||
}
|
||||
INFO_LOG(DSPHLE, "Done shutting down sound stream");
|
||||
}
|
||||
|
||||
std::vector<std::string> GetSoundBackends() {
|
||||
std::vector<std::string> backends;
|
||||
// Add avaliable output options
|
||||
if (DSound::isValid())
|
||||
backends.push_back("DSound");
|
||||
if (AOSound::isValid())
|
||||
backends.push_back("AOSound");
|
||||
if (OpenALStream::isValid())
|
||||
backends.push_back("OpenAL");
|
||||
backends.push_back("NullSound");
|
||||
|
||||
return backends;
|
||||
}
|
||||
|
||||
} // Namespace
|
||||
|
||||
@@ -1,5 +1,22 @@
|
||||
#ifndef _AUDIO_COMMON_H
|
||||
#define _AUDIO_COMMON_H
|
||||
// Copyright (C) 2003-2009 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, version 2.0.
|
||||
|
||||
// This program 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 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _AUDIO_COMMON_H_
|
||||
#define _AUDIO_COMMON_H_
|
||||
|
||||
#include "Common.h"
|
||||
#include "../../../PluginSpecs/pluginspecs_dsp.h"
|
||||
@@ -17,4 +34,4 @@ namespace AudioCommon {
|
||||
std::vector<std::string> GetSoundBackends();
|
||||
} // Namespace
|
||||
|
||||
#endif // AUDIO_COMMON
|
||||
#endif // _AUDIO_COMMON_H_
|
||||
|
||||
@@ -15,26 +15,22 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef __DSOUNDSTREAM_H__
|
||||
#define __DSOUNDSTREAM_H__
|
||||
#include "SoundStream.h"
|
||||
#ifndef _DSOUNDSTREAM_H_
|
||||
#define _DSOUNDSTREAM_H_
|
||||
|
||||
#include "SoundStream.h"
|
||||
#include "Thread.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "stdafx.h"
|
||||
|
||||
#include <mmsystem.h>
|
||||
#include <dsound.h>
|
||||
|
||||
#define BUFSIZE 32768
|
||||
#define MAXWAIT 70 //ms
|
||||
|
||||
#define MAXWAIT 70 // miliseconds
|
||||
#endif
|
||||
|
||||
class DSound : public SoundStream
|
||||
{
|
||||
#ifdef _WIN32
|
||||
Common::Thread *thread;
|
||||
Common::CriticalSection soundCriticalSection;
|
||||
Common::Event soundSyncEvent;
|
||||
@@ -77,12 +73,6 @@ public:
|
||||
static bool isValid() { return true; }
|
||||
virtual bool usesMixer() const { return true; }
|
||||
virtual void Update();
|
||||
|
||||
#else
|
||||
public:
|
||||
DSound(CMixer *mixer, void *hWnd = NULL) :
|
||||
SoundStream(mixer) {}
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif //__DSOUNDSTREAM_H__
|
||||
#endif //_DSOUNDSTREAM_H_
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// Copyright (C) 2003-2009 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
@@ -162,4 +162,3 @@ void CMixer::PushSamples(short *samples, int num_stereo_samples)
|
||||
}
|
||||
push_sync.Leave();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// Copyright (C) 2003-2009 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
@@ -15,8 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _MIXER_H
|
||||
#define _MIXER_H
|
||||
#ifndef _MIXER_H_
|
||||
#define _MIXER_H_
|
||||
|
||||
#include "FixedSizeQueue.h"
|
||||
|
||||
@@ -42,10 +42,10 @@ public:
|
||||
|
||||
void SetThrottle(bool use) { m_throttle = use;}
|
||||
|
||||
// FIXME do we need this
|
||||
// TODO: do we need this
|
||||
bool IsHLEReady() { return m_HLEready;}
|
||||
void SetHLEReady(bool ready) { m_HLEready = ready;}
|
||||
//////
|
||||
// ---------------------
|
||||
|
||||
protected:
|
||||
int m_sampleRate;
|
||||
@@ -63,5 +63,4 @@ private:
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif // _MIXER_H_
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef __NULLSOUNDSTREAM_H__
|
||||
#define __NULLSOUNDSTREAM_H__
|
||||
#ifndef _NULLSOUNDSTREAM_H_
|
||||
#define _NULLSOUNDSTREAM_H_
|
||||
|
||||
#include "SoundStream.h"
|
||||
|
||||
@@ -39,4 +39,4 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
#endif //__NULLSOUNDSTREAM_H__
|
||||
#endif //_NULLSOUNDSTREAM_H_
|
||||
|
||||
@@ -44,4 +44,4 @@ void OpenALStream::Update()
|
||||
void OpenALStream::SoundThread()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,8 +15,9 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef __OPENALSTREAM_H__
|
||||
#define __OPENALSTREAM_H__
|
||||
#ifndef _OPENALSTREAM_H_
|
||||
#define _OPENALSTREAM_H_
|
||||
|
||||
#include "SoundStream.h"
|
||||
#include "Thread.h"
|
||||
|
||||
@@ -49,4 +50,4 @@ private:
|
||||
Common::Event soundSyncEvent;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef __SOUNDSTREAM_H__
|
||||
#define __SOUNDSTREAM_H__
|
||||
#ifndef _SOUNDSTREAM_H_
|
||||
#define _SOUNDSTREAM_H_
|
||||
|
||||
#include "Common.h"
|
||||
#include "Mixer.h"
|
||||
@@ -65,4 +65,4 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // _SOUNDSTREAM_H_
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// Copyright (C) 2003-2009 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
@@ -51,26 +51,29 @@ bool WaveFileWriter::Start(const char *filename)
|
||||
return false;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// -----------------
|
||||
// Write file header
|
||||
// ---------------
|
||||
// -----------------
|
||||
Write4("RIFF");
|
||||
Write(100 * 1000 * 1000); // write big value in case the file gets truncated
|
||||
Write4("WAVE");
|
||||
Write4("fmt ");
|
||||
|
||||
Write(16); // size of fmt block
|
||||
Write(0x00020001); //two channels, uncompressed
|
||||
|
||||
//const u32 sample_rate = 32000;
|
||||
const u32 sample_rate = 48000;
|
||||
Write(sample_rate);
|
||||
Write(sample_rate * 2 * 2); //two channels, 16bit
|
||||
|
||||
Write(0x00100004);
|
||||
Write4("data");
|
||||
Write(100 * 1000 * 1000 - 32);
|
||||
|
||||
// We are now at offset 44
|
||||
if (ftell(file) != 44)
|
||||
PanicAlert("wrong offset: %i", ftell(file));
|
||||
// ---------------------------
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -79,11 +82,14 @@ void WaveFileWriter::Stop()
|
||||
{
|
||||
if (!file)
|
||||
return;
|
||||
// u32 file_size = (u32)ftell(file);
|
||||
|
||||
// u32 file_size = (u32)ftell(file);
|
||||
fseek(file, 4, SEEK_SET);
|
||||
Write(audio_size + 36);
|
||||
|
||||
fseek(file, 40, SEEK_SET);
|
||||
Write(audio_size);
|
||||
|
||||
fclose(file);
|
||||
file = 0;
|
||||
}
|
||||
@@ -116,9 +122,12 @@ void WaveFileWriter::AddStereoSamplesBE(const short *sample_data, int count)
|
||||
{
|
||||
if (!file)
|
||||
PanicAlert("WaveFileWriter - file not open.");
|
||||
|
||||
if (count > BUF_SIZE * 2)
|
||||
PanicAlert("WaveFileWriter - buffer too small (count = %i).", count);
|
||||
if (skip_silence) {
|
||||
|
||||
if (skip_silence)
|
||||
{
|
||||
bool all_zero = true;
|
||||
for (int i = 0; i < count * 2; i++)
|
||||
if (sample_data[i])
|
||||
@@ -126,9 +135,10 @@ void WaveFileWriter::AddStereoSamplesBE(const short *sample_data, int count)
|
||||
if (all_zero)
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < count * 2; i++) {
|
||||
|
||||
for (int i = 0; i < count * 2; i++)
|
||||
conv_buffer[i] = Common::swap16((u16)sample_data[i]);
|
||||
}
|
||||
|
||||
fwrite(conv_buffer, count * 4, 1, file);
|
||||
audio_size += count * 4;
|
||||
}
|
||||
|
||||
@@ -15,17 +15,18 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
// WaveFileWriter
|
||||
|
||||
// Simple utility class to make it easy to write long 16-bit stereo
|
||||
// ---------------------------------------------------------------------------------
|
||||
// Class: WaveFileWriter
|
||||
// Description: Simple utility class to make it easy to write long 16-bit stereo
|
||||
// audio streams to disk.
|
||||
// Use Start() to start recording to a file, and AddStereoSamples to add wave data.
|
||||
// The float variant will convert from -1.0-1.0 range and clamp.
|
||||
// Alternatively, AddSamplesBE for big endian wave data.
|
||||
// If Stop is not called when it destructs, the destructor will call Stop().
|
||||
// ---------------------------------------------------------------------------------
|
||||
|
||||
#ifndef _WAVEFILE_H
|
||||
#define _WAVEFILE_H
|
||||
#ifndef _WAVEFILE_H_
|
||||
#define _WAVEFILE_H_
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -52,4 +53,4 @@ public:
|
||||
u32 GetAudioSize() { return audio_size; }
|
||||
};
|
||||
|
||||
#endif // _WAVEFILE_H
|
||||
#endif // _WAVEFILE_H_
|
||||
|
||||
@@ -51,12 +51,12 @@
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderThrough=""
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
ForcedIncludeFiles="stdafx.h"
|
||||
ForcedIncludeFiles=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -124,12 +124,12 @@
|
||||
RuntimeLibrary="1"
|
||||
BufferSecurityCheck="false"
|
||||
FloatingPointModel="0"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderThrough=""
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
ForcedIncludeFiles="stdafx.h"
|
||||
ForcedIncludeFiles=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -191,18 +191,18 @@
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="2"
|
||||
AdditionalIncludeDirectories="../../PluginSpecs"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
EnableEnhancedInstructionSet="2"
|
||||
FloatingPointModel="0"
|
||||
RuntimeTypeInfo="false"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderThrough=""
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
ForcedIncludeFiles="stdafx.h"
|
||||
ForcedIncludeFiles=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -265,18 +265,18 @@
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="1"
|
||||
AdditionalIncludeDirectories="../../PluginSpecs"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;WIN32_LEAN_AND_MEAN"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
EnableEnhancedInstructionSet="0"
|
||||
FloatingPointModel="0"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderThrough=""
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
ForcedIncludeFiles="stdafx.h"
|
||||
ForcedIncludeFiles=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -337,16 +337,16 @@
|
||||
Optimization="3"
|
||||
FavorSizeOrSpeed="1"
|
||||
AdditionalIncludeDirectories="../../PluginSpecs"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;DEBUGFAST;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;DEBUGFAST;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;WIN32_LEAN_AND_MEAN"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
EnableEnhancedInstructionSet="2"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderThrough=""
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
ForcedIncludeFiles="stdafx.h"
|
||||
ForcedIncludeFiles=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -408,15 +408,15 @@
|
||||
Optimization="3"
|
||||
FavorSizeOrSpeed="1"
|
||||
AdditionalIncludeDirectories="../../PluginSpecs"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;DEBUGFAST;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_SECURE_SCL=0;DEBUGFAST;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;WIN32_LEAN_AND_MEAN"
|
||||
RuntimeLibrary="0"
|
||||
FloatingPointModel="0"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="stdafx.h"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderThrough=""
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
ForcedIncludeFiles="stdafx.h"
|
||||
ForcedIncludeFiles=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
@@ -720,62 +720,6 @@
|
||||
RelativePath=".\Src\Setup.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\stdafx.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DebugFast|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="DebugFast|x64"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\stdafx.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Src\StringUtil.cpp"
|
||||
>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// Copyright (C) 2003-2009 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2003-2008 Dolphin Project.
|
||||
// Copyright (C) 2003-2009 Dolphin Project.
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
@@ -15,8 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _JIT_ABI_H
|
||||
#define _JIT_ABI_H
|
||||
#ifndef _JIT_ABI_H_
|
||||
#define _JIT_ABI_H_
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
@@ -74,10 +74,10 @@
|
||||
#define ABI_PARAM5 R8
|
||||
#define ABI_PARAM6 R9
|
||||
|
||||
#endif
|
||||
#endif // WIN32
|
||||
|
||||
#endif
|
||||
#endif // X86
|
||||
|
||||
#endif // _JIT_ABI_H
|
||||
#endif // _JIT_ABI_H_
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
/* Most of the code in this file was shamelessly ripped from libcdio
|
||||
With minor adjustments */
|
||||
// Most of the code in this file was shamelessly ripped from libcdio With minor adjustments
|
||||
|
||||
#include "CDUtils.h"
|
||||
#include "Common.h"
|
||||
|
||||
/*!
|
||||
Follow symlinks until we have the real device file
|
||||
(idea taken from libunieject).
|
||||
*/
|
||||
// Follow symlinks until we have the real device file (idea taken from libunieject).
|
||||
void cdio_follow_symlink(const char * src, char * dst) {
|
||||
#ifndef _WIN32
|
||||
char tmp_src[PATH_MAX+1];
|
||||
@@ -32,10 +29,9 @@ void cdio_follow_symlink(const char * src, char * dst) {
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
Add/allocate a drive to the end of drives.
|
||||
Use cdio_free_device_list() to free this device_list.
|
||||
*/
|
||||
|
||||
// Add/allocate a drive to the end of drives.
|
||||
// Use cdio_free_device_list() to free this device_list.
|
||||
void cdio_add_device_list(char **device_list[], const char *drive,
|
||||
unsigned int *num_drives) {
|
||||
if (NULL != drive) {
|
||||
@@ -53,7 +49,7 @@ void cdio_add_device_list(char **device_list[], const char *drive,
|
||||
/* Drive not in list. Add it. */
|
||||
(*num_drives)++;
|
||||
*device_list = (char **)realloc(*device_list, (*num_drives) * sizeof(char *));
|
||||
(*device_list)[*num_drives-1] = strdup(drive);
|
||||
(*device_list)[*num_drives-1] = __strdup(drive);
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -67,10 +63,8 @@ void cdio_add_device_list(char **device_list[], const char *drive,
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
Free device list returned by cdio_get_devices or
|
||||
cdio_get_devices_with_cap.
|
||||
*/
|
||||
// Free device list returned by cdio_get_devices or
|
||||
// cdio_get_devices_with_cap.
|
||||
void cdio_free_device_list(char * ppsz_device_list[]) {
|
||||
char **ppsz_device_list_save=ppsz_device_list;
|
||||
if (!ppsz_device_list) return;
|
||||
@@ -83,10 +77,8 @@ void cdio_free_device_list(char * ppsz_device_list[]) {
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
/*
|
||||
Returns a string that can be used in a CreateFile call if
|
||||
c_drive letter is a character. If not NULL is returned.
|
||||
*/
|
||||
// Returns a string that can be used in a CreateFile call if
|
||||
// c_drive letter is a character. If not NULL is returned.
|
||||
const char *is_cdrom_win32(const char c_drive_letter) {
|
||||
|
||||
UINT uDriveType;
|
||||
@@ -103,7 +95,7 @@ const char *is_cdrom_win32(const char c_drive_letter) {
|
||||
case DRIVE_CDROM: {
|
||||
char sz_win32_drive_full[] = "\\\\.\\X:";
|
||||
sz_win32_drive_full[4] = c_drive_letter;
|
||||
return strdup(&sz_win32_drive_full[4]);
|
||||
return __strdup(&sz_win32_drive_full[4]);
|
||||
}
|
||||
default:
|
||||
//cdio_debug("Drive %c is not a CD-ROM", c_drive_letter);
|
||||
@@ -111,17 +103,14 @@ const char *is_cdrom_win32(const char c_drive_letter) {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Returns a pointer to an array of strings with the device names
|
||||
*/
|
||||
// Returns a pointer to an array of strings with the device names
|
||||
char ** cdio_get_devices_win32() {
|
||||
char **drives = NULL;
|
||||
unsigned int num_drives=0;
|
||||
char drive_letter;
|
||||
|
||||
/* Scan the system for CD-ROM drives.
|
||||
Not always 100% reliable, so use the USE_MNTENT code above first.
|
||||
*/
|
||||
// Scan the system for CD-ROM drives.
|
||||
// Not always 100% reliable, so use the USE_MNTENT code above first.
|
||||
for (drive_letter='A'; drive_letter <= 'Z'; drive_letter++) {
|
||||
const char *drive_str=is_cdrom_win32(drive_letter);
|
||||
if (drive_str != NULL) {
|
||||
@@ -305,7 +294,7 @@ static char *check_mounts_linux(const char *mtab)
|
||||
tmp = strstr(mntent->mnt_opts, "fs=");
|
||||
if ( tmp ) {
|
||||
free(mnt_type);
|
||||
mnt_type = strdup(tmp + strlen("fs="));
|
||||
mnt_type = __strdup(tmp + strlen("fs="));
|
||||
if ( mnt_type ) {
|
||||
tmp = strchr(mnt_type, ',');
|
||||
if ( tmp ) {
|
||||
@@ -316,7 +305,7 @@ static char *check_mounts_linux(const char *mtab)
|
||||
tmp = strstr(mntent->mnt_opts, "dev=");
|
||||
if ( tmp ) {
|
||||
free(mnt_dev);
|
||||
mnt_dev = strdup(tmp + strlen("dev="));
|
||||
mnt_dev = __strdup(tmp + strlen("dev="));
|
||||
if ( mnt_dev ) {
|
||||
tmp = strchr(mnt_dev, ',');
|
||||
if ( tmp ) {
|
||||
@@ -340,9 +329,7 @@ static char *check_mounts_linux(const char *mtab)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
Returns a pointer to an array of strings with the device names
|
||||
*/
|
||||
// Returns a pointer to an array of strings with the device names
|
||||
char **cdio_get_devices_linux () {
|
||||
|
||||
unsigned int i;
|
||||
@@ -351,8 +338,7 @@ char **cdio_get_devices_linux () {
|
||||
char **drives = NULL;
|
||||
unsigned int num_drives=0;
|
||||
|
||||
/* Scan the system for CD-ROM drives.
|
||||
*/
|
||||
// Scan the system for CD-ROM drives.
|
||||
for ( i=0; strlen(checklist1[i]) > 0; ++i ) {
|
||||
sprintf(drive, "/dev/%s", checklist1[i]);
|
||||
if ( is_cdrom_linux(drive, NULL) > 0 ) {
|
||||
@@ -372,9 +358,8 @@ char **cdio_get_devices_linux () {
|
||||
free(ret_drive);
|
||||
}
|
||||
|
||||
/* Scan the system for CD-ROM drives.
|
||||
Not always 100% reliable, so use the USE_MNTENT code above first.
|
||||
*/
|
||||
// Scan the system for CD-ROM drives.
|
||||
// Not always 100% reliable, so use the USE_MNTENT code above first.
|
||||
for ( i=0; checklist2[i].format; ++i ) {
|
||||
unsigned int j;
|
||||
for ( j=checklist2[i].num_min; j<=checklist2[i].num_max; ++j ) {
|
||||
@@ -389,9 +374,7 @@ char **cdio_get_devices_linux () {
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
Returns a pointer to an array of strings with the device names
|
||||
*/
|
||||
// Returns a pointer to an array of strings with the device names
|
||||
char **cdio_get_devices() {
|
||||
#ifdef _WIN32
|
||||
return cdio_get_devices_win32();
|
||||
@@ -405,9 +388,9 @@ char **cdio_get_devices() {
|
||||
}
|
||||
|
||||
// Need to be tested, does calling this function twice cause any damage?
|
||||
/*
|
||||
Returns true if device is cdrom/dvd
|
||||
*/
|
||||
|
||||
// Returns true if device is cdrom/dvd
|
||||
|
||||
bool cdio_is_cdrom(const char *device) {
|
||||
char **devices = cdio_get_devices();
|
||||
bool res = false;
|
||||
@@ -421,7 +404,9 @@ bool cdio_is_cdrom(const char *device) {
|
||||
cdio_free_device_list(devices);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Can we remove this?
|
||||
/*
|
||||
int main() {
|
||||
char** res = cdio_get_devices();
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
#ifndef CDUTILS_H
|
||||
#define CDUTILS_H
|
||||
#ifndef _CDUTILS_H_
|
||||
#define _CDUTILS_H_
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "windows.h"
|
||||
#include <windows.h>
|
||||
#define PATH_MAX MAX_PATH
|
||||
|
||||
#elif __APPLE__
|
||||
#include <paths.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <Carbon/Carbon.h>
|
||||
#include <IOKit/IOKitLib.h>
|
||||
#include <IOKit/storage/IOCDMedia.h>
|
||||
@@ -17,16 +18,10 @@
|
||||
#include <IOKit/IOBSD.h>
|
||||
|
||||
#elif __linux__
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <mntent.h>
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
@@ -34,20 +29,14 @@
|
||||
#include <linux/cdrom.h>
|
||||
#endif // WIN32
|
||||
|
||||
/*
|
||||
Returns a pointer to an array of strings with the device names
|
||||
*/
|
||||
// Returns a pointer to an array of strings with the device names
|
||||
char **cdio_get_devices();
|
||||
|
||||
/*!
|
||||
Free device list returned by cdio_get_devices or
|
||||
cdio_get_devices_with_cap.
|
||||
*/
|
||||
// Free device list returned by cdio_get_devices or
|
||||
// cdio_get_devices_with_cap.
|
||||
void cdio_free_device_list(char * ppsz_device_list[]);
|
||||
|
||||
/*
|
||||
Returns true if device is cdrom/dvd
|
||||
*/
|
||||
// Returns true if device is cdrom/dvd
|
||||
bool cdio_is_cdrom(const char *device);
|
||||
|
||||
#endif // CDUTILS_H
|
||||
#endif // _CDUTILS_H_
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user