U3D Audio System

Source: Internet
Author: User

I. Basic information

1. Supported Sound formats

WAV OGG MP3 AIFF MOD s3m xm IT after importing, unity will choose the compression method:WAV: Lossless, good sound, large file, suitable for shorter filesOGG,MP3: lossy, file small, suitable for longer files, such as game background music   2. Compression format (Compression Forma ) drag into Audio-view panel: 1/PCM: is WAV format2/vorbis: Is the OGG format3/ADPCM: Compresses the PCM16 compression sample to 4 bits4/mp3: When packaged as a mobile end  3. Load type (load types)1/decompress on Load: Extract files After program load, reduce run-time performance overhead, high memory consumption2/compressed in memory: Compress the file when playing in the RAM, small memory, suitable for long music3/streaming: Stream, directly read audio data from disk, occupy more memory than the original file is much smaller, suitable for playing long music, such as background music   4. Data Setup (Sample rate Setting)1/preserve Sample rate: Raw default sampled data (Common)2/optimize Sample Rate: Optimized data3/override Sample Rate: Custom Data  5. Otherforce to Mono: forced Monoload in Background: Background loadingpreload audio Data: Pre-fabricated sound files  6. Audio Manager AudiomanagerEdit-project Settings-audio Global Volume: Overall volume-1 maxVolume rolloff Scale: Volume attenuation (for 3D sound)-The higher the value, the faster the volume attenuation-the real-world effect at 1Doppler Factor: Doppler effect (for mobile sound)default Speaker mode: defaults to Speaker modeDSP buffer size:dsp Cache area size (general default)  Ii. Audio Listener and audio Source   1.Audio SourceMute Mute: tick to play but can't hearBypass effects Pass-through sound: all sound in the switch sceneBypass Listener Effect: Audio switch for listenersBypass Reverb Zone: Audio switch for mixed areasplay on awake: Play when the program is runningLoop : LoopingPriority : Playback level, default 128, the higher the number, the lower the number, the higher the sizeVolume: VolumePitch: Change the speed of the sound to change the speed of the tone, the faster the tone, the higherStereo Pan: ChannelSpatial blend:2d, 3D mixing amountReverb Zone Mix: Mix amount of confusing areas   3D Sound Settings:Doppler Lever: Doppler level (when objects move at high speed to see the effect)Spread: Propagation AngleVolume rolloff Volume attenuation type:logarithmic rolloff: logarithmic typeLinear rolloff: LinetypeCustom rolloff: CustomizingMin Max Distance: min Max distance
  1. using UnityEngine;
  2. using System.Collections;
  3. publicclassAudioController:MonoBehaviour{
  4. privateAudioSource myAudio;
  5. voidStart(){
  6. myAudio =this.GetComponent<AudioSource>();
  7. }
  8. voidOnGUI()
  9. {
  10. if(GUILayout.Button("play"))
  11. {
  12. if(!myAudio.isPlaying)
  13. {
  14. myAudio.Play();
  15. }
  16. }
  17. if(GUILayout.Button("stop"))
  18. {
  19. if(myAudio.isPlaying)
  20. {
  21. myAudio.Stop();
  22. }
  23. }
  24. }
  25. }
  third, audio mixer mixer--audio The output property of the source component requires a mixer (to add effects to the sound)if set, the process of receiving the sound becomes: Audio source output to audio mixer-then to listener (mixer can be overlapped) 



From for notes (Wiz)



U3D Audio System

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.