Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

AudioEngine

The AudioEngine type allows you to organize all your 3d audio content in one place. More...

Inherits Item

This type was introduced in Qt 5.0.

Properties

Signals

Detailed Description

AudioEngine is part of the QtAudioEngine 1.0 module.

 import QtQuick 2.0
 import QtAudioEngine 1.0

 Rectangle {
     color:"white"
     width: 300
     height: 500

     AudioEngine {
         id:audioengine

         AudioSample {
             name:"explosion"
             source: "explosion-02.wav"
         }

         Sound {
             name:"explosion"
             PlayVariation {
                 sample:"explosion"
             }
         }

         dopplerFactor: 1
         speedOfSound: 343.33 // Approximate speed of sound in air at 20 degrees Celsius

         listener.up:"0,0,1"
         listener.position:"0,0,0"
         listener.velocity:"0,0,0"
         listener.direction:"0,1,0"
     }

     MouseArea {
         anchors.fill: parent
         onPressed: {
             audioengine.sounds["explosion"].play();
         }
     }
 }

AudioEngine acts as a central library for configuring all 3d audio content in an app, so you should define only one in your app.

It is mostly used as a container to access other types such as AudioCategory, AudioSample and Sound.

See also AudioCategory, AudioSample, Sound, SoundInstance, AttenuationModelLinear, and AttenuationModelInverse.

Property Documentation

read-onlycategories : map

Container of all AudioCategory instances.


dopplerFactor : real

This property holds a simple scaling for the effect of doppler shift.


read-onlylistener : QtAudioEngine1::AudioListener

This property holds the listener object. You can change various properties to affect the 3D positioning of sounds.

See also AudioListener.


read-onlyliveInstances : int

This property indicates how many live sound instances there are at the moment.


read-onlyloading : bool

This property indicates if the audio engine is loading any audio sample at the moment. This may be useful if you specified the preloaded property in AudioSample and would like to show a loading screen to the user before all audio samples are loaded.

/sa finishedLoading, AudioSample::preloaded


read-onlysamples : map

Container of all AudioSample instances.


read-onlysounds : map

Container of all Sound instances.


speedOfSound : real

This property holds the reference value of the sound speed (in meters per second) which will be used in doppler shift calculation. The doppler shift calculation is used to emulate the change in frequency in sound that is perceived by an observer when the sound source is travelling towards or away from the observer. The speed of sound depends on the medium the sound is propagating through.


Signal Documentation

AudioEngine::finishedLoading()

This signal is emitted when loading has completed.

The corresponding handler is onFinishedLoading.


AudioEngine::isLoadingChanged()

This signal is emitted when the loading property changes.

The corresponding handler is onIsLoadingChanged.


AudioEngine::liveInstanceCountChanged()

This signal is emitted when the number of live instances managed by the AudioEngine is changed.

The corresponding handler is onLiveInstanceCountChanged.


AudioEngine::ready()

This signal is emitted when the AudioEngine is ready to use.

The corresponding handler is onReady.


Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web