User Tag List

Показано с 1 по 10 из 36

Тема: AY:воспроизведение WAV-файла

Древовидный режим

Предыдущее сообщение Предыдущее сообщение   Следующее сообщение Следующее сообщение
  1. #18

    Регистрация
    01.01.2009
    Адрес
    Донецк, Украина
    Сообщений
    3,260
    Спасибо Благодарностей отдано 
    35
    Спасибо Благодарностей получено 
    10
    Поблагодарили
    9 сообщений
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    По умолчанию

    Цитата Сообщение от Vitamin Посмотреть сообщение
    Откуда инфа?
    Тут есть инфа - http://support.microsoft.com/kb/89879/ru

    Ну и тут еще немного - http://arcw.comptek.ru/telephony/tnotes/tt1-13.html

    Принцип декодирования ADPCM:
    ADPCM Decoding

    Figure 2 shows a block diagram of the ADPCM decoding process. An ADPCM sample is presented to the decoder. The decoder computes the difference between the previous linear output estimate and the anticipated one. This difference is added to the previous estimate to produce the linear output estimate. The input ADPCM sample is also presented to the step size calculator to compute the step size estimate.

    Figure 2

    The decoder accepts ADPCM code values, L(n), and step size values. It calculates a reproduced differential value, and accumulates an estimated waveform value, X. Here is a pseudocode algorithm:

    d(n) = (ss(n)*B2)+(ss(n)/2*B1)+(ss(n)/4*B0)+(ss(n)/8)
    if (B3 = 1)
    then d(n) = d(n) * (-1)
    _ _
    X(n) = X(n-1) + d(n)

    Note: For the calculation of ss(n), see Calculation of Step Size.
    Calculation of Step Size

    For both the encoding and decoding process, the ADPCM algorithm adjusts the quantizer step size based on the most recent ADPCM value. The step size for the next sample, n+1, is calculated with the following equation:

    ss(n+1) = ss(n) * 1.1M(L(n))

    This equation can be implemented efficiently as a two-stage lookup table. First the magnitude of the ADPCM code is used as an index to look up an adjustment factor as shown in Table 1) . Then that adjustment factor is used to move an index pointer in Table 2. The index pointer then points to the new step size. Values greater than 3 will increase the step size. Values less than 4 decrease the step size.

    Table 1 - M(L(n)) Values
    Код:
                             L(n) Value         M(L(n))
                            1111 or 0111           +8
                            1110 or 0110           +6
                            1101 or 0101           +4
                            1100 or 0100           +2
                            1011 or 0011           -1
                            1010 or 0010           -1
                            1001 or 0001           -1
                            1000 or 0000           -1
    Table 2 - Calculated Step Sizes
    Код:
           No.  Step Size  No.  Step Size No.  Step Size  No.  Step Size
            1      16      13      50     25      157     37     494
            2      17      14      55     26      173     38     544
            3      19      15      60     27      190     39     598
            4      21      16      66     28      209     40     658
            5      23      17      73     29      230     41     724
            6      25      18      80     30      253     42     796
            7      28      19      88     31      279     43     876
            8      31      20      97     32      307     44     963
            9      34      21     107     33      337     45     1060
           10      37      22     118     34      371     46     1166
           11      41      23     130     35      408     47     1282
           12      45      24     143     36      449     48     1411
           49     1552
    This method of adapting the scale factor with changes in the waveform is optimized for voice signals, not square waves or other non-sinusoidal waveforms.

    Initial Conditions

    When the ADPCM algorithm is reset the step size ss(n) is set to the minimum value (16) and the estimated waveform value X is set to zero (half scale). Playback of 48 samples (24 bytes) of plus and minus zero (10002 and 00002) will reset the algorithm. Twenty four bytes of 08 Hex or 80 Hex will satisfy this requirement. It is necessary to alternate positive and negative zero values because the encoding formula always adds 1/8 of the quantization size. If all values were positive or negative, a DC component would be added that would create a false reference level.
    В принципе ничего сложного, но врядли хватит спеку сил на лету это распаковать, хотя все зависит от частоты дискретизации.
    GS-у и DMAUSC это под силу, а вот AY не уверен.
    Последний раз редактировалось Дмитрий; 06.08.2012 в 11:08.

Информация о теме

Пользователи, просматривающие эту тему

Эту тему просматривают: 1 (пользователей: 0 , гостей: 1)

Похожие темы

  1. Ответов: 46
    Последнее: 26.01.2026, 06:43
  2. Чтение файла в tr-dos
    от hippiman в разделе Программирование
    Ответов: 14
    Последнее: 29.09.2011, 11:11
  3. воспроизведение AY+SOUNDRIVE возможно?
    от solegstar в разделе Музыка
    Ответов: 7
    Последнее: 25.05.2011, 09:19
  4. Воспроизведение YM на ATM 2+
    от POIND в разделе ATM
    Ответов: 8
    Последнее: 25.07.2005, 16:09

Ваши права

  • Вы не можете создавать новые темы
  • Вы не можете отвечать в темах
  • Вы не можете прикреплять вложения
  • Вы не можете редактировать свои сообщения
  •