Hello,
I want to develope a sound datatype to play 32 bit 7.1 (8 channels) PCM sounds (WAV or AIFF storage container), to take advantage of HDAudio where supported (X1000 and other possible sound cards).
The target is what is covered by the latest public SDK (currently 53.24).
My questions are:
1) Is playback of such sounds supported? How about streaming?
2) Can a generic sound datatype output audio through AHI directly?
3) Do source code examples exist?
Thanks, regards
@Massi
The current AmigaOS datatypes system needs to identify the data type based on file format or (AFAIR) filename pattern. I'm not sure if you can have a single datatype descriptor that handles data potentially stored in two different container (file) formats.
AmigaOne X5000-020 / 2GB RAM / Sapphire Pulse Radeon RX 560 / AmigaOS 4.1 Final Edition Update 2
@trixie
I mentioned those 2 file formats in the sense that I refer to uncompressed lossless PCM and yes they are mutually exclusive.
Say I started to have a look at some WAV files, however the storage container itself is not very relevant at this stage.
@All
Quick responses according to my investigation so far:
1)
NO, we are not there, not yet.
Only playback of 32 bit stereo (2 channels) sounds is supported. Streaming possible.
2)
YES, but it seems like a kind of hack (?).
3)
No idea.
I reserve the right to be wrong :)
Well yes you could, using the hook part of the descriptor to examine the file data.
But more usually you would have two descriptors that called the same class. (See the drawing.datatype from the openamiga project for very good example).
eg for this case
WAV71 and AIFF71 which were higher priority than the WAV and AIFF descriptors and with could distinguish a 7.1 encoded wav of aiff and pass the file on if not in that format for the standard datatypes to pick up.
There again that means using a hook function anyway so perhaps your back to a SND71 descriptor anyway....
Streaming is in principle supported but not many if any do stream.
sound.datatype does not support more than 32bit stereo playback to my knowledge
You would need to write a your own base class to handle true 7.1 playback (which only work on cards with support for it) or perhaps mix your 7.1 into a stereo equivalent.
A datattype class can do what ever you want, but *usually* you inherit most methods from a root class like sound or picture etc. so you would not care about playback, allowing the root sound.datatype to handle it.
Programs that want greater control often use sound.datatype (and subclasses) to load the data but then use their own AHI player code. (eg AWeb).
Yes. There are full examples on the DEV CD 2.1 if you have acces to it and there is in dpeth documentation here
http://wiki.amigaos.net/wiki/Datatypes_Library
There many datatypes with src code on os4depot too.
@broadblues
Thanks for your reply.
Uncompressed 32 bit 7.1 PCM sounds, like for example those stored on Blu-ray discs, take a lot of storage space, that is why streaming could be very important to have.
OK.
Actually I haven' t decided how to shape this software yet (sound datatype, GUI application, Shell command). Designing ongoing.
This I wanted to hear ;)
Well, OK better than nothing :)