Menu

do {}

2011-01-05
2013-04-29
  • Brian Doyle

    Brian Doyle - 2011-01-05

    Hi,

    I trying to use the following block of code for creating a menu:

            $currentLoops = 0;
        
            do {
            
                $agi->stream_file($agi->swift_file("Press 1 for ",8000,"Allison-8kHz"));
        
                $agi->stream_file($agi->swift_file("Press 2 for ",8000,"Allison-8kHz"));
        
                $agi->stream_file($agi->swift_file("Press 3 for ",8000,"Allison-8kHz"));
        
                $MenuChoice = $agi->get_data('beep', 5000, 1);
        
                ++$currentLoops;
        
            } while ($MenuChoice['result'] == 0 || $currentLoops <= 3) ;
    

    I found that it garbled the audio playback, is it not possible to use a do loop in this fashion with phpagi?

    Thanks

    - b

     
  • Brian Doyle

    Brian Doyle - 2011-01-29

    Ended up resolving this, no change to the code itself, simply be copying the code into a new file for some reason, weird.

    - b

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.