src/mess/audio/mac.c
| r7078 | r7079 | |
| 68 | 68 | INT16 last_val = 0; |
| 69 | 69 | stream_sample_t *buffer = outputs[0]; |
| 70 | 70 | mac_sound *token = get_token(device); |
| 71 | mac_state *mac = (mac_state *)device->machine->driver_data; |
| 71 | 72 | |
| 73 | if ((mac->mac_model == MODEL_MAC_PORTABLE) || (mac->mac_model == MODEL_MAC_PB100)) |
| 74 | { |
| 75 | memset(buffer, 0, samples * sizeof(*buffer)); |
| 76 | return; |
| 77 | } |
| 78 | |
| 72 | 79 | /* if we're not enabled, just fill with 0 */ |
| 73 | 80 | if (device->machine->sample_rate == 0) |
| 74 | 81 | { |
| r7078 | r7079 | |
| 104 | 111 | mac_sound *token = get_token(device); |
| 105 | 112 | |
| 106 | 113 | memset(token, 0, sizeof(*token)); |
| 114 | |
| 107 | 115 | token->snd_cache = auto_alloc_array(device->machine, UINT8, SND_CACHE_SIZE); |
| 108 | 116 | token->mac_stream = stream_create(device, 0, 1, MAC_SAMPLE_RATE, 0, mac_sound_update); |
| 109 | 117 | } |