Book Image

Dart By Example

By : David Mitchell
Book Image

Dart By Example

By: David Mitchell

Overview of this book

Table of Contents (17 chapters)
Dart By Example
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Playing sound in the browser


This feature was deliberately left until last as continually listening to the same sound effect can become quite irritating! MP3 is probably the best supported format for various web browsers, with one exception—Dartium.

Tip

Dartium is built from the Chromium open source project. The project does not include any proprietary codecs including MP3. When creating projects, it is sometimes fine to just use MP3 and test the audio parts of the application in another browser.

For this project, three formats of the same sound file are provided. The OGG format will run from Dartium and most browsers. If you are having trouble, try another format.

Producing sound effects

To create a sound effect to play when the slide changes, a tool such as Bfxr can be used. It can be found on the Web at http://www.bfxr.net/ (where there are links to downloads for standalone versions as well) and is a powerful audio creation tool.

As it was created for use during game jams (time-constrained...