Sound Datatype

7 posts / 0 new
Last post
Massi
Massi's picture
Offline
Last seen: 3 years 2 months ago
Joined: 2012-03-28 17:16
Sound Datatype
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
trixie
trixie's picture
Offline
Last seen: 4 hours 5 min ago
Joined: 2011-02-03 13:58
@Massi I want to develope a
@Massi
I want to develope a sound datatype to play 32 bit 7.1 (8 channels) PCM sounds (WAV or AIFF storage container)
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.
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition Author of WordNet for OS4
Massi
Massi's picture
Offline
Last seen: 3 years 2 months ago
Joined: 2012-03-28 17:16
@trixie I mentioned those 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.
Massi
Massi's picture
Offline
Last seen: 3 years 2 months ago
Joined: 2012-03-28 17:16
@All Quick responses
@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 :)
broadblues
broadblues's picture
Offline
Last seen: 4 weeks 1 day ago
Joined: 2012-05-02 21:48
The current AmigaOS datatypes
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.
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....
broadblues
broadblues's picture
Offline
Last seen: 4 weeks 1 day ago
Joined: 2012-05-02 21:48
My questions are: 1) Is
My questions are: 1) Is playback of such sounds supported? How about streaming?
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.
2) Can a generic sound datatype output audio through AHI directly?
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).
3) Do source code examples exist?
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.
Massi
Massi's picture
Offline
Last seen: 3 years 2 months ago
Joined: 2012-03-28 17:16
@broadblues Thanks for your
@broadblues Thanks for your reply.
Streaming is in principle supported but not many if any do stream.
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.
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.
OK. Actually I haven' t decided how to shape this software yet (sound datatype, GUI application, Shell command). Designing ongoing.
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).
This I wanted to hear ;)
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.
Well, OK better than nothing :)
Log in or register to post comments