Bug 56624 - FFT values not correct in Visualizer OnFftDataCapture callback
Summary: FFT values not correct in Visualizer OnFftDataCapture callback
Status: RESOLVED NORESPONSE
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 8.0 (15.4)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2017-05-18 16:15 UTC by Ray Kelly
Modified: 2017-08-21 20:26 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Capture from Android Studio using same methods (31.59 KB, image/png)
2017-05-18 16:15 UTC, Ray Kelly
Details
Xamarin FFT results (incorrect) (121.05 KB, image/png)
2017-05-18 16:15 UTC, Ray Kelly
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NORESPONSE

Description Ray Kelly 2017-05-18 16:15:13 UTC
Created attachment 22273 [details]
Capture from Android Studio using same methods

I am getting only 255's and 0's in the FFT array in the Visualizer callback.  This does not represent the correct data.  I have provided 2 screenshots.  You can see in Xamarin that FFT only holds 0's and 255's.  In the other screenshot you can see in Android Studio that there are real values.

Here is the visualizer setup code.

            myVisualizer = new Visualizer(0);
            int minRange = Visualizer.GetCaptureSizeRange()[0];
            int maxRange = Visualizer.GetCaptureSizeRange()[1];            
            myVisualizer.SetCaptureSize(maxRange);
            myVisualizer.SetDataCaptureListener(this, Visualizer.MaxCaptureRate / 2, false, true);
Comment 1 Ray Kelly 2017-05-18 16:15:46 UTC
Created attachment 22274 [details]
Xamarin FFT results (incorrect)
Comment 2 Jon Douglas [MSFT] 2017-06-27 15:31:23 UTC
(In reply to Ray Kelly from comment #0)
> Created attachment 22273 [details]
> Capture from Android Studio using same methods
> 
> I am getting only 255's and 0's in the FFT array in the Visualizer callback.
> This does not represent the correct data.  I have provided 2 screenshots. 
> You can see in Xamarin that FFT only holds 0's and 255's.  In the other
> screenshot you can see in Android Studio that there are real values.
> 
> Here is the visualizer setup code.
> 
>             myVisualizer = new Visualizer(0);
>             int minRange = Visualizer.GetCaptureSizeRange()[0];
>             int maxRange = Visualizer.GetCaptureSizeRange()[1];            
>             myVisualizer.SetCaptureSize(maxRange);
>             myVisualizer.SetDataCaptureListener(this,
> Visualizer.MaxCaptureRate / 2, false, true);

Although this looks like a bug from first glance, we are going to need a way to reproduce this and confirm that this is indeed a bug. Can you please upload a sample project of both the Android Studio code and Xamarin.Android code demonstrating the difference? I.e. it can be a File->New Project with the methods of code you have in your screenshots. Please ensure everything is setup to the point of hitting the OnDataCaptureListener.

I am marking this bug as NEEDINFO for the time being. Thank you for the report!
Comment 3 Jon Douglas [MSFT] 2017-08-21 20:26:55 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!