with text_io; use text_io;
with snd4ada; use snd4ada;
with interfaces.c;
with interfaces.c.strings;
with ada.command_line;

procedure one is
	subtype glint is interfaces.c.int;
	subtype gldouble is interfaces.c.double;

	linestr: string(1..80);
	last: natural;
	choir: glint;
	--title: constant string := "./choir.wav";
	--title: constant string := "./begin.wav";

begin

if ada.command_line.argument_count = 1 then

	declare --outer
		title : string := Ada.Command_Line.Argument(1);
	begin --declare


		snd4ada.initSnds;

		choir:=snd4ada.initLoop( 
			interfaces.c.Strings.New_string(title));


		put_line("Hit <enter> to begin");
		get_line(linestr,last);

		snd4ada.playLoop(choir);

		put_line("hit <enter> to end");
		get_line(linestr,last);

		snd4ada.stopLoop(choir);

		termSnds;

	end;

end if;
end one;

