Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
43 user(s) are online (29 user(s) are browsing Forums)

Members: 0
Guests: 43

more...

Support us!

Headlines






Datatypes infos for sound
Quite a regular
Joined:
2008/11/3 12:06
From South France
Posts: 763
Hi All,
Now that I have added support for DATATYPES in AmiDARK Engine concerning Images and textures, I'd like to do the same concerning sounds...

Concerning pictures, there is the structure BitmapHeader that allow me to get all informations needed to build the final image in memory.

When I look at soundclass.h ... I have no structure like bitmapheader in pictureclass.h ... Only a structure for voice sample ...
Is there a *non* documented structure or other file related structure I can use to load a sound using datatypes, and use it ...
Or does the use of datatypes for sound is different from method for images ?

Thank you.

Kindest Regards,
AmiDARK
http://www.amidark-engine.com

_________________
All we have to decide is what to do with the time that is given to us.
   Report Go to top

Re: Datatypes infos for sound
Amigans Defender
Joined:
2006/11/17 22:40
From England
Posts: 3256
@freddix

VoiceHeader is the sound equivalent of BitMapHeader.

Everything else you need (arguably everything you need) can be obtained with GetDTAttrs and the tags documented in the sound.datatype AutoDoc.

NB: There are some "streaming" sound datatypes. These only stream and output audio internally using STM_PLAY - YOU CANNOT GET THE RAW DATA OUT OF THEM. This mostly makes them useless for anything other than MultiView, but fortunately there are very few streaming ones (MPEGA is the only one which springs to mind)

   Report Go to top

Re: Datatypes infos for sound
Quite a regular
Joined:
2008/11/3 12:06
From South France
Posts: 763
@Chris
so, datatypes for sound cannot be used with AHI ... not ?

_________________
All we have to decide is what to do with the time that is given to us.
   Report Go to top

Re: Datatypes infos for sound
Home away from home
Joined:
2007/9/11 12:31
From Russia
Posts: 7016
@freddix

Imho for supporting sounds you need to use AHI directly. That will give you more freedom when you will add more stuff, and you will be not limited by datatypes. For example, did we have ogg.datatype ? With AHI you can do whatever you want, but datatypes (imho) provide you very few functions for.

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: Datatypes infos for sound
Home away from home
Joined:
2007/1/26 21:48
From New Zealand
Posts: 2310
@freddix

Quote:

freddix wrote:
@Chris
so, datatypes for sound cannot be used with AHI ... not ?


Chris said that a few of the sound datatypes don't provide access to the raw data. However, most do. Have a look in the sound datatype's header file, and you'll find the methods that you need to call in order to extract raw data. Once you have the raw data, you can do whatever you like.

@Chris

Does the sound datatype support extracting the raw audio data block by block? If so, then I see no reason why anyone would create a "streaming datatype" since reading the data block by block allows the data to be read on demand. If not, then this is something that needs to be fixed.

Hans

_________________
http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
   Report Go to top

Re: Datatypes infos for sound
Quite a regular
Joined:
2008/11/3 12:06
From South France
Posts: 763
Thank you for your answers :)

@Hans:
in fact, I may prefer to have AmiDARK Engine depend on datatypes than on external libr like it was with glpng for example. Adding DataType support for Images allowed me to remove the glpng lib so now, when someone Install AmiDARK Engine on his computer, (s)he only need Amiga OS 4 SDK to be prior installed.

does it exist .library and source code for loading sounds like .ogg .wav (shouldn't be difficult to load .wav), .mp3 ... ? that can be used FREELY even for shareware products ?

Kindest Regards,
AmiDARK.

_________________
All we have to decide is what to do with the time that is given to us.
   Report Go to top

Re: Datatypes infos for sound
Amigans Defender
Joined:
2006/11/17 22:40
From England
Posts: 3256
@Hans

Quote:
Does the sound datatype support extracting the raw audio data block by block?


No, you can only get the full thing. Yes, this needs to be fixed.

   Report Go to top

Re: Datatypes infos for sound
Just popping in
Joined:
2007/9/3 18:27
From France
Posts: 144
@freddix

Ogg and Vorbis codecs are available on OS4depot (only static and shared object though, no Amiga shared library). AFAIR, their licence allow you to use them in any binaries as long as you distribute them with the copyright notice.

   Report Go to top

Re: Datatypes infos for sound
Quite a regular
Joined:
2008/11/3 12:06
From South France
Posts: 763
@centaurz:
Ok
I'll check this.
There are also library for MOD and MED at os4depot.net that I'll use for mucis replay.

I'll check all these next week

Thank you.

Kindest Regards,
AmiDARK

_________________
All we have to decide is what to do with the time that is given to us.
   Report Go to top

Re: Datatypes infos for sound
Quite a regular
Joined:
2009/4/28 4:57
From Adelaide, Australia
Posts: 939
@freddix

libogg and libvorbis come with OS4.1 in SObjs: (Update 1 and beyond at least).

The libs I uploaded to OS4Depot are newer versions.

The license files are already in DH0:Documentation/SO
BJS_licenses.txt

As far as I know, and from my testing, the updated libraries are compatible with the versions that come with OS4.1, for now.

It's probably best to link things statically in this case (personal opinion), but as for including the license file, perhaps it'd be OK to just put in the AmiDARK .readme, a pointer to the existing license file which hasn't changed at all, at the location mentioned above.

   Report Go to top

Re: Datatypes infos for sound
Quite a regular
Joined:
2008/11/3 12:06
From South France
Posts: 763
@MickJT
ok

_________________
All we have to decide is what to do with the time that is given to us.
   Report Go to top

Re: Datatypes infos for sound
Just can't stay away
Joined:
2006/11/30 11:30
From Finland
Posts: 1800
@freddix

For MP3 support you can use mpega.library.

   Report Go to top

Re: Datatypes infos for sound
Quite a regular
Joined:
2008/11/3 12:06
From South France
Posts: 763
@salass00:
Thank you.

Many infos now to add various support soonly in AmiDARK Engine :)

_________________
All we have to decide is what to do with the time that is given to us.
   Report Go to top

Re: Datatypes infos for sound
Quite a regular
Joined:
2008/11/3 12:06
From South France
Posts: 763
@all:

Hi, just a small "up" to ask you if someone have source code samples showing how to load a sample (ogg/vorbis/mp3/wav) using plugins you've listed below) in memory and uncompress it ?
Once I have the sample uncompressed in memory with needed informations, I can use it with AHI..

Thank you.

Kindest Regards,
AmiDARK.

_________________
All we have to decide is what to do with the time that is given to us.
   Report Go to top





[Advanced Search]



Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project