aboutsummaryrefslogtreecommitdiffstats
path: root/src/oma.cpp
diff options
context:
space:
mode:
authorDaniil Cherednik <dan.cherednik@gmail.com>2024-06-18 23:01:36 +0000
committerDaniil Cherednik <dan.cherednik@gmail.com>2024-06-26 20:14:13 +0000
commit1d99ba9937d6588f4b00dc3766e165e9e3ff834d (patch)
tree931a13e03da012f856b42677f87a7c5b5568c714 /src/oma.cpp
parent23a4e5f1dd7ce24f65a2af0598d1f92af4b5c424 (diff)
downloadatracdenc-1d99ba9937d6588f4b00dc3766e165e9e3ff834d.tar.gz
[AT3P] Introduce at3p development branch
- Simpe code just to produce correct at3p zero frame
Diffstat (limited to 'src/oma.cpp')
-rw-r--r--src/oma.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/oma.cpp b/src/oma.cpp
index 78be514..22f9388 100644
--- a/src/oma.cpp
+++ b/src/oma.cpp
@@ -24,12 +24,14 @@ using std::string;
using std::vector;
using std::unique_ptr;
-TOma::TOma(const string& filename, const string&, uint8_t /*numChannel*/,
+TOma::TOma(const string& filename, const string&, uint8_t numChannel,
uint32_t /*numFrames*/, int cid, uint32_t framesize, bool jointStereo) {
oma_info_t info;
info.codec = cid;
info.samplerate = 44100;
- info.channel_format = jointStereo ? OMA_STEREO_JS : OMA_STEREO;
+ info.channel_format = (cid == OMAC_ID_ATRAC3)
+ ? (jointStereo ? OMA_STEREO_JS : OMA_STEREO)
+ : (numChannel == 1 ? OMA_MONO : OMA_STEREO);
info.framesize = framesize;
File = oma_open(filename.c_str(), OMAM_W, &info);
if (!File)