Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
154 user(s) are online (122 user(s) are browsing Forums)

Members: 1
Guests: 153

white, more...

Headlines

 
  Register To Post  

AHI C examples under AmigaOS 4.1
Quite a regular
Quite a regular


See User information
Hi,

does someone have a working sample for AHI ?
I tried the samples in the latest release on os4depot.net and none compiles
error with smakefile:6: *** missing separator

I use gcc for compiling.

Regards,
AmiDARK.

All we have to decide is what to do with the time that is given to us.
Go to top
Re: AHI C examples under AmigaOS 4.1
Home away from home
Home away from home


See User information
@freddix

Hi. What example you need ? Playing of raw data or playing of mod files or mp3 playing ? Or you just need initialization example ?


Edited by kas1e on 2009/12/17 10:27:26
Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: AHI C examples under AmigaOS 4.1
Quite a regular
Quite a regular


See User information
@freddix

Quote:

freddix wrote:
error with smakefile:6: *** missing separator


First you can't use straight away an smakefile with GCC (i.e. you have to do some modifications into it).
Last this kind of error tells me you edited the file with CubicIDE and you didn't pay attention to tell him to keep spaces in the file. I'm sure if you go to line 6 in smakefile you'll find that it replaced your tabs by some spaces (which is forbidden in makefile format specification : any command line should be introduced by at least a tab).

Back to a quiet home... At last
Go to top
Re: AHI C examples under AmigaOS 4.1
Just can't stay away
Just can't stay away


See User information
@freddix

I just uploaded the source code for my old OS4 Missile Command clone:
http://www.a500.org/downloads/games/misscmd-src_lha.readme

It has some functions for .wav sample loading and playback (using AHI) that may or may not be useful for you...

Go to top
Re: AHI C examples under AmigaOS 4.1
Quite a regular
Quite a regular


See User information
@kas1e :
A sample that :
-open
- play a raw sample from memory
- close AHI device
a bit like the SimplePlay sample available in the latest AHI developer archive on os4depot.net

@abalaban : I tried from newcli : make -f smakefile

@salass00 : Did you use AHI v4 or older ? SRC downloaded .. will check it.

Regards,
AmiDARK.

All we have to decide is what to do with the time that is given to us.
Go to top
Re: AHI C examples under AmigaOS 4.1
Home away from home
Home away from home


See User information
@freddix

I uploaded my source of ahi raw-sound "player" here.

That is some lame-crappy routines, which i use in the main code like that:

load_sound("PROGDIR:data/sounds/click.raw",0);
load_sound("PROGDIR:data/sounds/flip_page.raw",1);

play_sound(0);
play_sound(1);

and on exit stage just:

free(snd_buffer[0]);
free(snd_buffer[1]);


That routines spawn a new process by CreateNewProcTags, so, the player will have own process, and that will be better if for example make all just as one process.

That is not ready for using source example, but if you will have any problems with it, i can make it working over gcc on os4 tommorow (basically, that already works fine on aros's gcc, so i think no problems will be with that).


ps. I can be wrong, but "smakefile" - that is make file for old SASC / 68k. Not sure that it will be compiles by the modern make (but i can be wrong here). For you will be better just do command line compiling for tests (like: gcc file.c -o file -llibs , etc).

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: AHI C examples under AmigaOS 4.1
Quite a regular
Quite a regular


See User information
@kas1e
Ok Thank you.
I would appreciate if you can :)
I will check this.

Regards,
AmiDARK.

All we have to decide is what to do with the time that is given to us.
Go to top
Re: AHI C examples under AmigaOS 4.1
Home away from home
Home away from home


See User information
@freddix

Here is working os4/gcc example. I just play there 3 sounds and exit. Also I am pretty sure, there is something wrong with Wait()/etc stuff, but in general that works, and for begining and brief look will be imho ok :) Compilation string:
shell:> gcc play_ahi_raw.c

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: AHI C examples under AmigaOS 4.1
Quite a regular
Quite a regular


See User information
@kas1e
Thank you,
I will learn from this :)

Regards,
Freddix / AmiDARK

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

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project