27 December 2013, 18:11 | #1 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
ahi_v2 device driver (uae2.audio)?
Hi, I copied od-win32/ahidsound_new.cpp (AHI/OpenAL) into FS-UAE and made necessary changes to make it compile and enable it.
But the problem I face now is that I cannot find the Amiga-side device driver (uae2.audio) anywhere. Is this perhaps a work in progress without any released driver? |
27 December 2013, 20:19 | #2 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Unfortunately it was not finished, I found some AHI feature that OpenAL couldn't do or something. I don't remember, it was years ago..
|
27 December 2013, 21:51 | #3 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
OK, I suspected as much since a google search returned next to nothing, and the copyright notice said 2008
I guess AHI in FS-UAE will have to be implemented using ahidsound_dsonly.cpp as reference implementation instead (code from scratch, or perhaps some applicable code borrowed from the OpenAL implementation). Thanks! |
27 December 2013, 21:59 | #4 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Unfortunately (also), current ahi driver is quite stupid, 2 channel only, requires mixing, most of the heavy stuff is done on m68k side and so on..
|
27 December 2013, 22:02 | #5 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
Yes I noticed the ahi_winuae interface was much simpler than the ahi_v2 interface (I guess the upside of that is that re-implementing the host interface in FS-UAE will be quite simple).
|
28 December 2013, 04:18 | #6 |
Registered User
Join Date: Dec 2013
Location: Mountain View / USA
Posts: 34
|
AFAIK, the uaeaudio AHI driver is on the Amiga side a rip-off from the demo Paula driver from the AHIDev package. (Wasn't it Bernd Roesch?). The Paula register calls are replaced with the all mighty UAE call
Code:
GetReg d2,AHI_unit\samplerate ;samplerate GetReg d3,\buffer_outsize MOVEQ #0,d0 MOVEQ #0,d1 ;Mode= open sounddevice JSR $f0ffc0 ;call the uaelib (d0 contain samplerate) A proper driver could make it more direct, having the AHI buffers directly the host buffers allowing optimal latency through AHI. Low latency it important for games to have the sound events react instantly, and for a music synthesizer (what I do) to be real-time playable. Ideally the driver would map the host devices and bit resolutions to the AHI driver as well. The WinUAE one only allows the "default" device and 16bit, which is better than nothing of course. Let me know if I could help with a concept or implementation for a proper driver. What I dont want is more splitting between "platforms", so a solution that would work for both, WinUAE and FS UAE (Mac & Linux etc. too) would be preferred. Remember to put the difficult part on the cross platform code, so it is easy to have Mac, Linux, Android <future platform X> etc. drivers. Last edited by Der Wanderer; 28 December 2013 at 04:24. |
28 December 2013, 08:16 | #7 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Which is exactly what "uae2.audio" was supposed to solve. Direct mapping to host audio channels (up to 7.1), light wrapper to native sound system, all mixing and other heavy stuff is left for native drivers and so on.
Unfortunately AHI requires behavior that no native sound libraries (at least portable ones) don't directly support which would require moving resampling/mixing back to UAE side. Which would suck again. I think it was on the fly pitch change or something like that. (I don't remember). Check AHI driver API spec, find matching PC side API. Done |
28 December 2013, 09:27 | #8 |
Registered User
Join Date: Dec 2013
Location: Mountain View / USA
Posts: 34
|
Maybe it was playing samples at different frequencies at the same time (that was probably inspired by Paula, but is not really something nowadays sound cards do). I would be happy to provide code to do that. Let me check this in more detail.
|
28 December 2013, 09:32 | #9 | |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Quote:
I think it was some on the fly operation that had to be synced to exact sample position that is not supported. (Which Paula can easily do too) |
|
28 December 2013, 18:35 | #10 |
Registered User
Join Date: Dec 2013
Location: Mountain View / USA
Posts: 34
|
Then it was maybe the "playfunc". This is required in HD-Rec to sync MIDI output to audio output.
The playfunc need to be called in sample exact intervalls. Last edited by Der Wanderer; 28 December 2013 at 23:11. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
audio device in use problem | Hungry Horace | project.WHDLoad | 14 | 28 January 2019 11:41 |
Creating network device driver: multiple units? | tnt23 | Coders. System | 1 | 26 July 2013 09:18 |
device driver C tutorial/skeleton ? | watz | Coders. General | 2 | 04 September 2012 23:12 |
Is it possible to unload a device driver without rebooting? | dabone | support.Hardware | 4 | 01 February 2010 18:13 |
(Offtopic?) Dos device driver modifcation query | Silver | Coders. General | 16 | 14 February 2007 18:05 |
|
|