-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathcdaoconfdlg.cpp
108 lines (101 loc) · 4.07 KB
/
cdaoconfdlg.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/**
* Copyright (C) 2022 Jo2003 (olenka.joerg@gmail.com)
* This file is part of cd2netmd_gui
*
* cd2netmd 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, either version 3 of the License, or
* (at your option) any later version.
*
* cd2netmd 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 for more details.
*
* You should have received a copy of the GNU General Public License
*/
#include "cdaoconfdlg.h"
#include "ui_cdaoconfdlg.h"
//------------------------------------------------------------------------------
//! @brief Constructs a new instance.
//!
//! @param parent The parent widet
//------------------------------------------------------------------------------
CDaoConfDlg::CDaoConfDlg(QWidget *parent) :
QDialog(parent),
ui(new Ui::CDaoConfDlg), mTocManip(false)
{
ui->setupUi(this);
QString s = R"(
<b style="font-size: x-large;">(D)isc (A)t (O)nce or Gapless Mode</b> - Please read careful!
<p>DAO / gapless is supported in 2 modes. Both have there pros and cons.</p>
<b style="font-size: large;">DAO LP2 Mode</b>
<p>The audio content will be extracted and compressed at once. After that, the audio will be split into tracks
and transferred to your NetMD device. You have to expect quality loss due to LP2 mode and the usage of an
external encoder. Playback is only supported on MDLP capable devices.</p>
<b style="font-size: large;">DAO SP Mode</b>
<p>The audio content will be extracted and transferred to the NetMD device at once.
After that the audio data will be split directly on the NetMD device through TOC edit. This gives you the best possible quality.
Playback is supported on all MD devices. Unfortunately, this is only supported on Sony / Aiwa portable type R, and type S devices.</p>
<table style="margin: 4px"><tr><td style="color:red; background-color: #fff6d1; padding: 3px; border: 3px solid red;">
For DAO SP I'd recommend the usage of a blank MD. While we take care for existing content, you might end up with issues on very fragmented discs.
Furthermore, take care that there is no pending TOC edit on your NetMD device before starting the DAO upload. Simply press 'stop' on your device
<b>→ right now ←</b> before going on!
</td></tr></table>
<blockquote><p>Please note: Any change on CD track list will be reverted before starting!</p>
</blockquote>)";
ui->textBrowser->setHtml(s);
QFont f = ui->textBrowser->font();
#ifdef Q_OS_MAC
f.setPointSize(f.pointSize() + 4);
#else
f.setPointSize(f.pointSize() + 1);
#endif
ui->textBrowser->setFont(f);
}
//------------------------------------------------------------------------------
//! @brief Destroys the object.
//------------------------------------------------------------------------------
CDaoConfDlg::~CDaoConfDlg()
{
delete ui;
}
//------------------------------------------------------------------------------
//! @brief give DAO mode
//!
//! @return DAO mode
//------------------------------------------------------------------------------
CDaoConfDlg::DAO_Mode CDaoConfDlg::daoMode() const
{
DAO_Mode mode = DAO_Mode::DAO_WTF;
if (!mTocManip)
{
mode = DAO_Mode::DAO_LP2;
}
else if (ui->buttonDAOMode->checkedButton()->objectName() == "radioDaoLP2")
{
mode = DAO_Mode::DAO_LP2;
}
else if (ui->buttonDAOMode->checkedButton()->objectName() == "radioDaoSP")
{
mode = DAO_Mode::DAO_SP;
}
return mode;
}
//--------------------------------------------------------------------------
//! @brief tell if TOC manipulation is supported
//!
//! @param tm support flag
//--------------------------------------------------------------------------
void CDaoConfDlg::tocManip(bool tm)
{
mTocManip = tm;
if (!mTocManip)
{
ui->radioDaoSP->setEnabled(false);
}
else
{
ui->radioDaoSP->setChecked(true);
}
}