InitialObjectDescriptor {
 objectDescriptorID 1
 audioProfileLevelIndication 255
 visualProfileLevelIndication 254
 sceneProfileLevelIndication 1
 graphicsProfileLevelIndication 1
 ODProfileLevelIndication 1
 esDescr [
  ES_Descriptor {
   ES_ID 1
   decConfigDescr DecoderConfigDescriptor {
    streamType 3
    decSpecificInfo BIFSConfig {
     isCommandStream true
     pixelMetric true
     pixelWidth 300
     pixelHeight 300
    }
   }
  }
  ES_Descriptor {
   ES_ID 2
   decConfigDescr DecoderConfigDescriptor {
    streamType 1
   }
  }
 ]
}

OrderedGroup {
 children [
  Background2D {
   backColor 1 1 1
  }
  WorldInfo {
   info ["This shows MediaControl" "controling audio playback speed" "" "GPAC Regression Tests" "$Date: 2007-07-27 09:46:10 $ - $Revision: 1.3 $" "(C) 2002-2004 GPAC Team"]
   title "Media Control Test"
  }
  Sound2D {
   source AudioSource {
    url [od:10]
    stopTime -1
    numChan 2
   }
  }
  DEF MC MediaControl {
   url [od:10]
   loop TRUE
  }
  Transform2D {
   translation -100 0
   children [
    DEF TS1 TouchSensor {}
    Shape {
     appearance Appearance {
      material DEF M1 Material2D {
       emissiveColor 1 0 0
       filled TRUE
      }
     }
     geometry Circle {
      radius 30
     }
    }
    Transform2D {
     children [
      Shape {
       appearance DEF TXTAPP Appearance {
        material Material2D {
         emissiveColor 0 0 0
         filled TRUE
        }
       }
       geometry DEF TXT_FAST Text {
        string ["Faster" "x 2"]
        fontStyle DEF FS FontStyle {
         justify ["MIDDLE" "MIDDLE"]
         size 18
        }
       }
      }
     ]
    }
   ]
  }
  Transform2D {
   translation 100 0
   children [
    DEF TS2 TouchSensor {}
    Shape {
     appearance Appearance {
      material DEF M2 Material2D {
       emissiveColor 0 0 1
       filled TRUE
      }
     }
     geometry Circle {
      radius 30
     }
    }
    Transform2D {
     children [
      Shape {
       appearance USE TXTAPP
       geometry DEF TXT_SLOW Text {
        string ["Slower" "x 0.5"]
        fontStyle USE FS
       }
      }
     ]
    }
   ]
  }
  Transform2D {
   children [
    DEF TS3 TouchSensor {}
    Shape {
     appearance Appearance {
      material DEF M3 Material2D {
       emissiveColor 0 1 0
       filled TRUE
      }
     }
     geometry Circle {
      radius 30
     }
    }
    Transform2D {
     children [
      Shape {
       appearance USE TXTAPP
       geometry Text {
        string ["Mute"]
        fontStyle USE FS
       }
      }
     ]
    }
   ]
  }
  DEF C1 Conditional {
   buffer {
    REPLACE MC.mediaSpeed BY 2
    REPLACE TXT_FAST.string BY ["Faster", "x 2"]
    REPLACE M1.emissiveColor BY 1 0.5 0.5
   }
  }
  DEF AC1 Conditional {
   buffer {
    REPLACE MC.mediaSpeed BY 4
    REPLACE TXT_FAST.string BY ["Faster", "x 4"]
    REPLACE M1.emissiveColor BY 1 0.5 0.5
   }
  }
  DEF C2 Conditional {
   buffer {
    REPLACE MC.mediaSpeed BY 0.5
    REPLACE TXT_SLOW.string BY ["Slower", "x 0.5"]
    REPLACE M2.emissiveColor BY 0.5 0.5 1
   }
  }
  DEF AC2 Conditional {
   buffer {
    REPLACE MC.mediaSpeed BY 0.25
    REPLACE TXT_SLOW.string BY ["Slower", "x 0.25"]
    REPLACE M2.emissiveColor BY 0.5 0.5 1
   }
  }
  DEF C3 Conditional {
   buffer {
    REPLACE MC.mute BY TRUE
    REPLACE M3.emissiveColor BY 0.5 1 0.5
   }
  }
  DEF RESET Conditional {
   buffer {
    REPLACE MC.mediaSpeed BY 1
    REPLACE MC.mute BY FALSE
    REPLACE M1.emissiveColor BY 1 0 0
    REPLACE M2.emissiveColor BY 0 0 1
    REPLACE M3.emissiveColor BY 0 1 0
   }
  }
 ]
}

ROUTE TS1.isOver TO C1.activate
ROUTE TS1.isOver TO RESET.reverseActivate
ROUTE TS1.isActive TO AC1.activate
ROUTE TS1.isActive TO C1.reverseActivate
ROUTE TS2.isOver TO C2.activate
ROUTE TS2.isOver TO RESET.reverseActivate
ROUTE TS2.isActive TO AC2.activate
ROUTE TS2.isActive TO C2.reverseActivate
ROUTE TS3.isOver TO C3.activate
ROUTE TS3.isOver TO RESET.reverseActivate

AT 0 {
  UPDATE OD [
   ObjectDescriptor {
    objectDescriptorID 10
    esDescr [
     ES_Descriptor {
      ES_ID 20
      OCR_ES_ID 20
      muxInfo MuxInfo {
       fileName "../auxiliary_files/count_english.mp3"
      }
     }
    ]
   }
  ]
}

