Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

AudioImporter.compressionBitrate

var compressionBitrate: int;
int compressionBitrate;
compressionBitrate as int

Description

Compression bitrate.

This value is in bits/second, e.g. 128000 would be 128 kbps.

	// Prints the bitrate of the imported audio files

class BitrateLogger extends AssetPostprocessor { function OnPreprocessAudio () { var audioImporter : AudioImporter = assetImporter; Debug.Log(assetPath + " - " + audioImporter.compressionBitrate + " bits/second"); } }