shogo4405 / HaishinKit.swift

Camera and Microphone streaming library via RTMP and SRT for iOS, macOS, tvOS and visionOS.
BSD 3-Clause "New" or "Revised" License
2.77k stars 614 forks source link

Is it possible to implement stereo channel for audio? If possible how i can implement this? #558

Closed uttam-iu closed 5 years ago

uttam-iu commented 5 years ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

shogo4405 commented 5 years ago

Is it possible to implement stereo channel for audio?

Yes. But iPhone's Built-In microphone is mono.

uttam-iu commented 5 years ago

how can i implement this? any demo code?

shogo4405 commented 5 years ago

Already support stereo channel for audio. No need to implement. Please buy external microphone. Ex.

uttam-iu commented 5 years ago

Thank you @shogo4405 , I already bought an external microphone. but i need how i use that part Like this, rtmpStream.audioSettings["sampleRate"] = 44100 rtmpStream.audioSettings["muted"] = false.

and whats for stereo or mono?

shogo4405 commented 5 years ago

Well. No needs settings. Can you give me more details?

uttam-iu commented 5 years ago

yes. i can.

i need menu ui for live stream app through your rtmp library. and update it when headphone connect or not. if not connect headphone then in ui shows only mono channel. but when headphone connects then shows mono and stereo channel with radio button and user can select mono r stereo and audio channel sets by selection. thats why i need the use case of stereo and mono channel. Thanks @shogo4405

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

leo150 commented 5 years ago

@uttam-iu you can check this answer to implement switching between the microphones. HaishinKit will handle changes in AVAudioSession automatically.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.