aboutsummaryrefslogtreecommitdiffstats
path: root/src/atrac/atrac3_bitstream.cpp
diff options
context:
space:
mode:
authorDaniil Cherednik <dan.cherednik@gmail.com>2019-05-15 01:14:42 +0300
committerDaniil Cherednik <dan.cherednik@gmail.com>2019-05-15 01:14:42 +0300
commited9629395ce9696164c1d617d573a47982e82169 (patch)
tree5dbe92165b9fa3750740331b7af165d0aaab88c3 /src/atrac/atrac3_bitstream.cpp
parent218e2163453deac6f7a74765a21258b5c566a8cc (diff)
downloadatracdenc-ed9629395ce9696164c1d617d573a47982e82169.tar.gz
Support for MS Windows platform
- VS build (2017 tested) - Media Foundation Framework support to read/write pcm data (instead of libsndfile)
Diffstat (limited to 'src/atrac/atrac3_bitstream.cpp')
-rw-r--r--src/atrac/atrac3_bitstream.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/atrac/atrac3_bitstream.cpp b/src/atrac/atrac3_bitstream.cpp
index 8a391db..d39faa2 100644
--- a/src/atrac/atrac3_bitstream.cpp
+++ b/src/atrac/atrac3_bitstream.cpp
@@ -12,7 +12,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
+ * License along with AtracDEnc; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
@@ -196,7 +196,7 @@ void TAtrac3BitStreamWriter::EncodeSpecs(const TSingleChannelElement& sce, NBitS
int mt[MaxSpecs];
const vector<TScaledBlock>& scaledBlocks = sce.ScaledBlocks;
- auto allocation = CreateAllocation(sce, bitsUsed, mt);
+ const auto& allocation = CreateAllocation(sce, bitsUsed, mt);
const vector<uint32_t>& precisionPerEachBlocks = allocation.second;
EncodeTonalComponents(sce, precisionPerEachBlocks, bitStream);
const uint32_t numBlocks = precisionPerEachBlocks.size(); //number of blocks to save
@@ -471,7 +471,7 @@ void TAtrac3BitStreamWriter::WriteSoundUnit(const vector<TSingleChannelElement>&
assert(s < 8);
}
}
- const uint16_t bitsUsedByGainInfoAndHeader = bitStream->GetSizeInBits();
+ const uint16_t bitsUsedByGainInfoAndHeader = (uint16_t)bitStream->GetSizeInBits();
usedBits[channel] = bitsUsedByGainInfoAndHeader;
assert(bitStream->GetSizeInBits() == usedBits[channel]);
}