diff options
author | chai <chaifix@163.com> | 2018-10-16 23:09:18 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-10-16 23:09:18 +0800 |
commit | 5534828032730762f8c1e4daf924b466fffb8be0 (patch) | |
tree | 1ae83fc877e4a2d136f6dd120260edd147b13e95 /src/libjin/Audio/Source.cpp | |
parent | 0fc4b3ad5f2ac8d5c0588f61c0cbed4349ee1430 (diff) |
*格式化代码
Diffstat (limited to 'src/libjin/Audio/Source.cpp')
-rw-r--r-- | src/libjin/Audio/Source.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/libjin/Audio/Source.cpp b/src/libjin/Audio/Source.cpp index 1dcd482..306d93f 100644 --- a/src/libjin/Audio/Source.cpp +++ b/src/libjin/Audio/Source.cpp @@ -6,24 +6,24 @@ namespace jin { -namespace audio -{ + namespace audio + { - static int check_header(const void *data, int size, const char *str, int offset) { - int len = strlen(str); - return (size >= offset + len) && !memcmp((char*)data + offset, str, len); - } + static int check_header(const void *data, int size, const char *str, int offset) { + int len = strlen(str); + return (size >= offset + len) && !memcmp((char*)data + offset, str, len); + } - SourceType Source::getType(const void* mem, int size) - { - if(check_header(mem, size, "WAVE", 8)) - return SourceType::WAV; - if(check_header(mem, size, "OggS", 0)) - return SourceType::OGG; - return SourceType::INVALID; - } + SourceType Source::getType(const void* mem, int size) + { + if(check_header(mem, size, "WAVE", 8)) + return SourceType::WAV; + if(check_header(mem, size, "OggS", 0)) + return SourceType::OGG; + return SourceType::INVALID; + } -} // audio + } // audio } // jin #endif // LIBJIN_MODULES_AUDIO |