Added alternative ADPCM decoding algorithm
This commit is contained in:
parent
3490cfe5bb
commit
a0b4722cb7
@ -109,11 +109,15 @@
|
||||
<Compile Include="MainWindow.Designer.cs">
|
||||
<DependentUpon>MainWindow.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="OptionPanels\ApplicationOptionPanel.cs" />
|
||||
<Compile Include="OptionPanels\ApplicationOptionPanel.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="OptionPanels\ApplicationOptionPanel.Designer.cs">
|
||||
<DependentUpon>ApplicationOptionPanel.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="OptionPanels\Application\DocumentsOptionPanel.cs" />
|
||||
<Compile Include="OptionPanels\Application\DocumentsOptionPanel.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="OptionPanels\Application\DocumentsOptionPanel.Designer.cs">
|
||||
<DependentUpon>DocumentsOptionPanel.cs</DependentUpon>
|
||||
</Compile>
|
||||
|
||||
@ -69,6 +69,9 @@ namespace UniversalEditor.DataFormats.Multimedia.Audio.BGM
|
||||
private static int ima9_rescale(int step, uint code)
|
||||
{
|
||||
/* 0,1,2,3,4,5,6,9 */
|
||||
// http://wiki.multimedia.cx/index.php?title=IMA_ADPCM
|
||||
return (int)(((int)code + 0.5) * step / (double)4);
|
||||
|
||||
int diff = step >> 3;
|
||||
if ((code & 1) != 0) diff += step >> 2;
|
||||
if ((code & 2) != 0) diff += step >> 1;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user