Тема: Vibra, Data, Midi
Показать сообщение отдельно
Старый 08.12.2010, 01:26   #13
NastyKhan
Оператор ЭВМ
 
Регистрация: 26.09.2010
Сообщений: 29
Написано 0 полезных сообщений
(для 0 пользователей)
Ответ: Vibra, Data, Midi

After some experimenting i still can't figure out, how to this thing works. I'm basing on this example i found inside the zip:

program test11111;
uses player;
procedure player_event(p:integer; e:String);
begin
Debug(e+':'+p);
end;
begin
player.init(2);
if not OpenPlayer('/message.mid', 'audio/midi') then Halt;
if not SetPlayerCount(-1) then Halt;
player.set_listener;
if not StartPlayer then Halt;

player.select(1);
if not OpenPlayer('/online.mid', 'audio/midi') then Halt;
if not SetPlayerCount(-1) then Halt;
player.set_listener;
if not StartPlayer then Halt;

Delay(5000);

drawText('Hello world!', 0, 0);
repaint;
delay(2000);
end.


And hell.. Don't get it. What is the point of 'player_event' procedure if it's never called? And why sim doesn't run when I remove it? Also which commands are responsible for loading files, which for declaring vars, and which for calling? What is .set_listener? I'm sorry but i will need some more clues or something.. easier to use.

Could u give another example please? And point 'this is were we load files', 'this is were we name vars' and 'this is how we call previously redefined sounds'..

Pls help.
(Offline)
 
Ответить с цитированием