Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by Sinnerboy_GHZ · Nov 02, 2016 at 12:19 PM · audiosdknative plugindsp

Native audio Plugin SDK channels question

Can someone else confirm that whilst parameters such as sample rate (state->samplerate) and DSP buffer size (state->dspbuffersize) are available at the point UNITY_AUDIODSP_RESULT UNITY_AUDIODSP_CALLBACK CreateCallback(UnityAudioEffectState* state) is called, channel input data (e.g. 1 = mono, 2 = stereo, 8 = 7.1 surround etc.) isn't available? More importantly, why is this - when all mentioned parameters are accessible from Unity's AudioManager and seem to have default values? Is there a way around this, if one requires speaker setup info at the initialization of the plugin as opposed to when audio begins streaming?

Thanks, Chris

PS Input and output channel values are accessible once ProcessCallback is called (inchannels, outchannels), but this isn't ideal as a first point of access to channel info.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Sinnerboy_GHZ · Dec 08, 2016 at 02:11 PM

Duplicate question on forum received following reply: " New

 Hi Sinnerboy,
 I'm not an audio expert but I will attempt an answer.

 As far as I understand it, you're trying to get the configuration of the speakers from the system at the beginning of the game, right? When you say "channel input data" you expect to get one of the values from AudioSpeakerMode?

 As you already know, you can define a default speakerMode in the Audio Manager settings in-editor, but once the game runs this setting is in the AudioSettings.speakerMode.

 Unfortunately this can'd be changed directly, but you can use AudioSettings.GetConfiguration to get the current one, and then in the OnAudioConfigurationChanged callback you can read (and possibly change with AudioSettings.Reset) the current audio configuration. You should be able to find the current speakerMode in there.

 Hope this solves your problem, apologies if I didn't understand the question in the first place!
  

Ciro Continisio Technical Evangelist @ Unity @CiroContns"

To which I've replied:

"Hi Ciro, Thanks for the reply. I'm not able to access AudioSettings. This may be due to the Native Audio DSP SDK being in C++ and the compiled code being in DLL format, whereas I imagine a C# script sitting in the Editor folder would be able to access those objects/classes without issue. I believe any audio parameter information sent from Unity to the audio plugin is captured with the AudioPluginInterface header and source within the SDK, and I'd merely like to confirm this information doesn't include the desired input/output channel configuration of the plugin (and why this is). This is fairly fundamental information a DSP plugin requires, ideally upon initialization.

Thanks, Chris"

Until it's clear where I should be directing these kinds of enquiries I'll keep posting on both this and the forum.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

86 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Changing Impulse Response AudioClip in Convolution Reverb Demo plugin of the Native Audio Plugin SDK 2 Answers

Audio Spatializer SDK. Source/Listener location matrix 0 Answers

Playback bit rate is faster than recording bit rate in Audio Spatializer SDK 0 Answers

Native audio plugin xcode build problem "undefined symbols" 0 Answers

Audio Spatializer Plugin SDK: how can plugin get channel count of input audio source? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges