diff options
| author | Jordan Woyak <jordan.woyak@gmail.com> | 2011-03-11 10:21:46 +0000 |
|---|---|---|
| committer | Jordan Woyak <jordan.woyak@gmail.com> | 2011-03-11 10:21:46 +0000 |
| commit | 59fd1008ca9cf4e9f75fdd6ee8ec53a2c7d7a13b (patch) | |
| tree | 1de127fb452967ccc052324d9aff0775ea1b76cf /Source/Core/AudioCommon/Src/WaveFile.h | |
| parent | 4f69672b2b31581746aae907e7757981fc48db77 (diff) | |
Wrapped fopen/close/read/write functions inside a simple "IOFile" class. Reading, writing, and error checking became simpler in most cases. It should be near impossible to forget to close a file now that the destructor takes care of it. (I hope this fixes Issue 3635) I have tested the functionality of most things, but it is possible I broke something. :p
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7328 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/AudioCommon/Src/WaveFile.h')
| -rw-r--r-- | Source/Core/AudioCommon/Src/WaveFile.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/Core/AudioCommon/Src/WaveFile.h b/Source/Core/AudioCommon/Src/WaveFile.h index 6176998d3b..72a090814b 100644 --- a/Source/Core/AudioCommon/Src/WaveFile.h +++ b/Source/Core/AudioCommon/Src/WaveFile.h @@ -28,17 +28,19 @@ #ifndef _WAVEFILE_H_ #define _WAVEFILE_H_ -#include <stdio.h> +#include "FileUtil.h" class WaveFileWriter { - FILE *file; + File::IOFile file; bool skip_silence; u32 audio_size; short *conv_buffer; void Write(u32 value); void Write4(const char *ptr); + WaveFileWriter& operator=(const WaveFileWriter&)/* = delete*/; + public: WaveFileWriter(); ~WaveFileWriter(); |
