1 |
|
/* |
2 |
|
* audio_amiga.cpp - Audio support, AmigaOS implementation using AHI |
3 |
|
* |
4 |
< |
* Basilisk II (C) 1997-1999 Christian Bauer |
4 |
> |
* Basilisk II (C) 1997-2000 Christian Bauer |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
* it under the terms of the GNU General Public License as published by |
57 |
|
|
58 |
|
|
59 |
|
// Prototypes |
60 |
– |
#ifdef __GNUC__ |
60 |
|
static __saveds __attribute__((regparm(3))) ULONG audio_callback(struct Hook *hook /*a0*/, struct AHISoundMessage *msg /*a1*/, struct AHIAudioCtrl *ahi_ctrl /*a2*/); |
62 |
– |
#else |
63 |
– |
static __saveds __regargs ULONG audio_callback(struct Hook *hook /*a0*/, struct AHISoundMessage *msg /*a1*/, struct AHIAudioCtrl *ahi_ctrl /*a2*/); |
64 |
– |
#endif |
61 |
|
|
62 |
|
|
63 |
|
/* |
174 |
|
* AHI sound callback, request next buffer |
175 |
|
*/ |
176 |
|
|
181 |
– |
#ifdef __GNUC__ |
177 |
|
static __saveds __attribute__((regparm(3))) ULONG audio_callback(struct Hook *hook /*a0*/, struct AHISoundMessage *msg /*a1*/, struct AHIAudioCtrl *ahi_ctrl /*a2*/) |
183 |
– |
#else |
184 |
– |
static __saveds __regargs ULONG audio_callback(struct Hook *hook /*a0*/, struct AHISoundMessage *msg /*a1*/, struct AHIAudioCtrl *ahi_ctrl /*a2*/) |
185 |
– |
#endif |
178 |
|
{ |
179 |
|
play_buf ^= 1; |
180 |
|
|
192 |
|
|
193 |
|
// Put data into AHI buffer (convert 8-bit data unsigned->signed) |
194 |
|
if (AudioStatus.sample_size == 16) |
195 |
< |
memcpy(sample[play_buf].ahisi_Address, Mac2HostAddr(ReadMacInt32(apple_stream_info + scd_buffer)), work_size); |
195 |
> |
Mac2Host_memcpy(sample[play_buf].ahisi_Address, ReadMacInt32(apple_stream_info + scd_buffer), work_size); |
196 |
|
else { |
197 |
|
uint32 *p = (uint32 *)Mac2HostAddr(ReadMacInt32(apple_stream_info + scd_buffer)); |
198 |
|
uint32 *q = (uint32 *)sample[play_buf].ahisi_Address; |