bayonne-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bayonne-devel] How to test for the existance of an audio file


From: Tony White
Subject: [Bayonne-devel] How to test for the existance of an audio file
Date: Thu, 1 May 2008 01:07:41 +0300

Hi David and all,

In bayonne script, if I list several files to play eg.

play %1 %2 %3 ......

...where %1, %2, %3 etc. variables have been set to file1.au,
file2.au, file3.au .....

so long as all three files exist on disk, then all is well.  BUT if,
for example, file1.au doesn't exist, then the play will abort -
without playing the rest of the files.

The files are dynamically generated outside the bayonne environment -
and may sometimes be missing.  So I am stuck on how to test within a
script that a file exists before attempting to play it - and indeed to
substitute a 'default' file instead.

The only way i can see is to jump out into a TGI - but is there
already a way to test this?  And if not, maybe this would be a
possible test to include in the next version?

Oh - and before I get the suggestion:
play %1
play %2
play %3
....

yes, that works insofar as playing all  files, even if one is missing
- but there is a 'step' delay between each 'play' statement - which I
want to avoid... and there seems to be no way to see if a file is
missing so as to be able to substitute a 'default' file instead.

Thanks,
-- 
Tony White




reply via email to

[Prev in Thread] Current Thread [Next in Thread]