I have an audio file array declared like so:
java.io.File[] file = new java.io.File[151];
for (int w = 0; w < 151; w++)
{
file[w] = new java.io.File(voice+"/"+letters[w]+".wav");
}
java.applet.AudioClip[] letAud = new java.applet.AudioClip[151];
try
{
for (int r = 0; r < 151; r++)
{
letAud[r] = java.applet.Applet.newAudioClip(file[r].toURL());
}
}
I would then like to find out how long it is.
Something like:
letAud[x].getNumberOfFrames() * letAud[x].getFrameRate();
This would then yeild the length of the audio file. Now how would i write the above code so that it would compile (LOL).
Thanks
java.io.File[] file = new java.io.File[151];
for (int w = 0; w < 151; w++)
{
file[w] = new java.io.File(voice+"/"+letters[w]+".wav");
}
java.applet.AudioClip[] letAud = new java.applet.AudioClip[151];
try
{
for (int r = 0; r < 151; r++)
{
letAud[r] = java.applet.Applet.newAudioClip(file[r].toURL());
}
}
I would then like to find out how long it is.
Something like:
letAud[x].getNumberOfFrames() * letAud[x].getFrameRate();
This would then yeild the length of the audio file. Now how would i write the above code so that it would compile (LOL).
Thanks