Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Turings Natural Delay
Index -> Programming, Turing -> Turing Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
PHP God




PostPosted: Sat Sep 13, 2003 11:01 pm   Post subject: Turings Natural Delay

code:

process music
 Music.PlayFile ("song1.mp3")
  loop
   Music.PlayFile ("song2.mp3")
  end loop
end music

fork music


Why is there a giant gaping hole between each time my soundfile is played?
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Sat Sep 13, 2003 11:27 pm   Post subject: (No subject)

my guess would be that turing is loading the file somewhere or other.

try looping a shorter file with lower sound quality, and see if that reduces the delay.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Dan




PostPosted: Sat Sep 13, 2003 11:40 pm   Post subject: (No subject)

i test the flowing code to see if it had anything to do with the loop or fork:

code:

Music.PlayFile ("C:\\MYSHAR~1\\NEG_TH~1.mp3")
Music.PlayFile ("C:\\MYSHAR~1\\DOT_HACK.mp3")


and i found that there was a dealy of less then 6 seconds.

may be it has somting to do with the fork, i have had troble with forks and playing files in turing b4.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
PHP God




PostPosted: Sun Sep 14, 2003 12:27 am   Post subject: (No subject)

The files are about 5 seconds long, and MP3 is as low as I go.

As well, if turing were loading it, wouldn't it be stored in memory after playing once?

I'm wondering if this can be done in C++ easier, if it is, it makes it more worth learning.
Dan




PostPosted: Sun Sep 14, 2003 12:45 am   Post subject: (No subject)

well basick C++ dose not have a comand to play mp3s built in to it. so you whould need to find a libraey file for that or make your own decoder Shocked .

but it whould probyl be faster
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
PHP God




PostPosted: Sun Sep 14, 2003 1:43 am   Post subject: (No subject)

what about any kind of sound file?
Dan




PostPosted: Sun Sep 14, 2003 2:49 pm   Post subject: (No subject)

to my knogale standered C/C++ dose not come with an libreay to play sound files but i know there are ones out there.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
PHP God




PostPosted: Sun Sep 14, 2003 3:11 pm   Post subject: (No subject)

Are you dyslexic man, I can't understand a word you say. Someone oughtta code a translator.


negative8.jpg
 Description:
 Filesize:  20.4 KB
 Viewed:  5031 Time(s)

negative8.jpg


AsianSensation




PostPosted: Sun Sep 14, 2003 4:07 pm   Post subject: (No subject)

jeez, it's just Dan speak...

maybe it's a good idea to learn it so you could understand what he is talking about? Dan actually gives out good ideas once in a while.

and if you seriously can't understand him (well, sucks for you) than here is a translated version:

Quote:
to my knogale standered C/C++ dose not come with an libreay to play sound files but i know there are ones out there.


=

Quote:
to my knowledge standard C/C++ does not come with a library to play sound files, but I know there are ones out there.
PHP God




PostPosted: Sun Sep 14, 2003 6:02 pm   Post subject: (No subject)

I know man, jk.
Catalyst




PostPosted: Sun Sep 14, 2003 6:34 pm   Post subject: (No subject)

if u want to do music in c++ u might want to look into DirectSound or DirectMusic
Dan




PostPosted: Sun Sep 14, 2003 9:55 pm   Post subject: (No subject)

PHP God wrote:
Are you dyslexic man...


yes Razz
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
krishon




PostPosted: Mon Sep 15, 2003 6:23 pm   Post subject: (No subject)

i dun't think fork shuld be a problem...it worked for my game when i used it
Mazer




PostPosted: Tue Sep 16, 2003 4:13 pm   Post subject: (No subject)

AsianSensation wrote:
and if you seriously can't understand him...


everyone can understand Dan! check it out:
Quote:

Aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it deosn't mttaer in waht oredr the ltteers in a wrod are, the olny iprmoetnt tihng is taht the frist and lsat ltteer be at the rghit pclae. The rset can be a total mses and you can sitll raed it wouthit porbelm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe.

Amzanig huh?
Dan




PostPosted: Tue Sep 16, 2003 4:22 pm   Post subject: (No subject)

Dance see, and i allmost all ways get the 1st and last letters right (almost)

multi
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 19 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: