Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » How to wait for a sample to stop playing in Allegro 5

Credits go to Arthur Kalliokoski for helping out!
This thread is locked; no one can reply to it. rss feed Print
How to wait for a sample to stop playing in Allegro 5
Edgar Reynaldo
Member #8,592
May 2007
avatar

Arthur Kalliokoski
Second in Command
February 2005
avatar

Example in paperclip, run from console with name of audio file as parameter for command line.

[EDIT]

Forgot the percent sign in line 101

      printf("sample position %d, sample length %d, sample is %4.2f%% complete\n",sample_position,sample_length,spos);

“Throughout history, poverty is the normal condition of man. Advances which permit this norm to be exceeded — here and there, now and then — are the work of an extremely small minority, frequently despised, often condemned, and almost always opposed by all right-thinking people. Whenever this tiny minority is kept from creating, or (as sometimes happens) is driven out of a society, the people then slip back into abject poverty. This is known as "bad luck.”

― Robert A. Heinlein

Edgar Reynaldo
Member #8,592
May 2007
avatar

Go to: