Previous 199869 Revisions Next

r37056 Thursday 9th April, 2015 at 22:27:09 UTC by Jonathan Gevaryahu
Merge branch 'master' of https://github.com/mamedev/mame
[src/emu/sound]l7a1045_l6028_dsp_a.c

trunk/src/emu/sound/l7a1045_l6028_dsp_a.c
r245567r245568
7373
7474   Sample data format TBA
7575
76   TODO:
77   - Sample format needs to be double checked;
78   - Octave Control/BPM/Pitch, right now XRally Network BGM wants 66150 Hz which is definitely too fast for Terry Bogard speech;
79   - Key Off;
80   - ADSR (registers 2 & 4?);
81   
7682***************************************************************************/
7783
7884#include "emu.h"
r245567r245568
110116void l7a1045_sound_device::device_start()
111117{
112118   /* Allocate the stream */
113   m_stream = stream_alloc(0, 2, 44100); //clock() / 384);
119   m_stream = stream_alloc(0, 2, 66150); //clock() / 384);
114120
115121   m_rom = m_region->base();
116122   m_rom_size = m_region->bytes();
r245567r245568
164170
165171
166172            data = m_rom[(start + pos) & (m_rom_size-1)];
167            sample = (INT8)data;
173            sample = ((INT8)(data & 0xfc)) << (3 - (data & 3));
168174            frac += step;
169175
170            outputs[0][j] += ((sample * vptr->l_volume) >> 8);
171            outputs[1][j] += ((sample * vptr->r_volume) >> 8);
176            outputs[0][j] += ((sample * vptr->l_volume) >> 9);
177            outputs[1][j] += ((sample * vptr->r_volume) >> 9);
172178         }
173179
174180         vptr->pos = pos;
r245567r245568
322328   {
323329      l7a1045_voice *vptr = &m_voice[m_audiochannel];
324330
325      #if 1
331      #if 0
326332      if(vptr->start != 0)
327333      {
328334      printf("%08x START\n",vptr->start);


Previous 199869 Revisions Next


© 1997-2024 The MAME Team