Author: robux4
Date: 2004-12-15 00:16:19 +0300 (Wed, 15 Dec 2004)
New Revision: 976
Modified:
trunk/DvdMenuXtractor/DvdMenuXtractor.cpp
trunk/DvdMenuXtractor/VobParser.cpp
Log:
the WAV data should be little-endian
more fixes on the scrollbar range
Modified: trunk/DvdMenuXtractor/DvdMenuXtractor.cpp
===================================================================
--- trunk/DvdMenuXtractor/DvdMenuXtractor.cpp 2004-12-14 12:16:56 UTC (rev 975)
+++ trunk/DvdMenuXtractor/DvdMenuXtractor.cpp 2004-12-14 21:16:19 UTC (rev 976)
@@ -651,10 +651,10 @@
}
m_gaDemuxProgress->SetValue(0);
- m_gaDemuxProgress->SetRange(aVobParser.GetPacketCount() >> 2);
+ m_gaDemuxProgress->SetRange(aVobParser.GetPacketCount() >> 4);
while(aVobParser.ParseNextPacket(*IfoFile))
{
- m_gaDemuxProgress->SetValue(aVobParser.GetPacketIndex() >> 2);
+ m_gaDemuxProgress->SetValue(aVobParser.GetPacketIndex() >> 4);
wxYield();
}
m_txtDemuxLog->AppendText("Done demuxing\n");
Modified: trunk/DvdMenuXtractor/VobParser.cpp
===================================================================
--- trunk/DvdMenuXtractor/VobParser.cpp 2004-12-14 12:16:56 UTC (rev 975)
+++ trunk/DvdMenuXtractor/VobParser.cpp 2004-12-14 21:16:19 UTC (rev 976)
@@ -1142,6 +1142,8 @@
void WavWriter::Write(uint8_t* buff, uint32_t size, uint32_t start_time, uint32_t end_time, wxString & debug)
{
+ if (m_bit_depth != 16) // not supported
+ return;
if (m_file == NULL)
{
uint8_t _tinteger[4];
@@ -1197,6 +1199,14 @@
fwrite("0000",4,1, m_file);
m_size = 0;
}
+ uint16_t _tmp;
+ for (size_t i=0; i < size; i+=2) {
+ _tmp = buff[i];
+ _tmp <<= 8;
+ _tmp += buff[i+1];
+ buff[i] = _tmp & 0xFF;
+ buff[i+1] = _tmp >> 8;
+ }
Writer::Write(buff, size, start_time, end_time, debug);
m_size += size;
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.