anarchuser / mic_stream

Flutter plugin to get an infinite audio stream from the microphone
https://pub.dev/packages/mic_stream
GNU General Public License v3.0
100 stars 68 forks source link

Doesn't work on iOS Simulator #84

Open darkstarx opened 11 months ago

darkstarx commented 11 months ago

iOS version 17.0

Permission is successfully granted. No data is coming while listening the stream. No any error is receiving.

      final rawStream = MicStream.microphone(
        audioSource: AudioSource.DEFAULT,
        sampleRate: 48000,
        channelConfig: ChannelConfig.CHANNEL_IN_MONO,
        audioFormat: AudioFormat.ENCODING_PCM_16BIT,
      );
      final sampleStream = rawStream.transform(MicStream.toSampleStream);
      _subscription = sampleStream.listen(_onData,
        onError: _onError,
      );

_onData isn't called no one time.

When running the app from xCode, it shows next messages:

AddInstanceForFactory: No factory registered for id <CFUUID 0x60000028bae0> F8BB1C28-BAE8-11D6-9C31-00039315CD46
AudioHardware-mac-imp.cpp:776  AudioObjectSetPropertyData: no object with given ID 0
AVAudioSessionImpl_Simulator.mm:140 Failed to set processVolumeScalar on device. Error: 560 947 818
AudioHardware-mac-imp.cpp:776  AudioObjectSetPropertyData: no object with given ID 0
AVAudioSessionImpl_Simulator.mm:140 Failed to set processVolumeScalar on device. Error: 560 947 818
anarchuser commented 11 months ago

This might be a duplicate of issue #27

anarchuser commented 11 months ago

either way, iOS emulator seems to cause issues, yes. I can only provide very limited support for iOS or macOS, though. Please try to examine the problem as well as you can.

Spme questions off my head: Do other recording plugins work? Can you test on a real device? Do you have permissions to record?

darkstarx commented 11 months ago

This might be a duplicate of issue #27

Hm.. I'm not sure. I've configured the microphone permission in the Podfile and it's fine on it (permission is granted, and I can observe it in iOS settings for my app on the simulator).

I'll try to check it on a real device.