A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: SoundTouch Class

  1. #1
    Member
    Join Date
    Nov 2007
    Posts
    83

    SoundTouch Class

    Hello, I'm trying to play an mp3 file using SoundTouch class. But I'm getting error.

    Code:
    var source:Sound = new Sound1();
    var output:Sound = new Sound();
    
    var soundTouch:SoundTouch = new SoundTouch();
    soundTouch.pitchSemitones = -6;
    
    var filter:SimpleFilter = new SimpleFilter(sound, soundTouch);
    output.addEventListener(SampleDataEvent.SAMPLE_DATA, filter.handleSampleData);
    
    output.play();
    This gives me error:

    Sahne 1, Katman ‘Katman 1’, Kare 1, Satır 18, Sütun 44 1120: sound tanımlanmamış özelliğinin erişimi.

    http://sudrap.org/paste/text/335615

    https://github.com/also/soundtouch-as3

  2. #2
    Senior Member
    Join Date
    Nov 2001
    Posts
    1,145
    You posted the error in a different language.

    The errror is sound is undefined when you're creating the new SimpleFilter. It should be source or output - one of the two Sounds you created - or define sound.

    var source:Sound = new Sound1(); should be var source:Sound = new Sound();

    Here's a good tutorial for sound: http://www.republicofcode.com/tutorials/flash/as3sound/

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center