Author Topic: FIR Audio Spectrum Analyzer  (Read 49758 times)

Siekmanski

  • Member
  • *****
  • Posts: 2561
Re: FIR Audio Spectrum Analyzer
« Reply #30 on: September 08, 2014, 03:00:32 AM »
Hi Biterider,

Is this D3D9 height map example working on your win 8.1 machine. ( press F1 to toggle between windowed and fulls screen mode )
If so then i have something to compare.
I think maybe it has something to do with the TestCooperativeLevel and Reset Methods.

Marinus
« Last Edit: September 08, 2014, 06:22:12 AM by Siekmanski »
Creative coders use backward thinking techniques as a strategy.

Siekmanski

  • Member
  • *****
  • Posts: 2561
Re: FIR Audio Spectrum Analyzer
« Reply #31 on: September 08, 2014, 06:01:27 AM »
Hi Biterider,

I have made 2 examples with different approaches to the rendering routine.
Could you test these on your win 8.1 PC ?

Marinus
Creative coders use backward thinking techniques as a strategy.

guga

  • Member
  • *****
  • Posts: 1449
  • Assembly is a state of art.
    • RosAsm
Re: FIR Audio Spectrum Analyzer
« Reply #32 on: September 08, 2014, 09:13:01 PM »
Hi Marinus

I found some app with source code that you may find interesting. It displays a graphic spectrum
https://www.relisoft.com/freeware/freq.html
Coding in Assembly requires a mix of:
80% of brain, passion, intuition, creativity
10% of programming skills
10% of alcoholic levels in your blood.

My Code Sites:
http://rosasm.freeforums.org
http://winasm.tripod.com

Biterider

  • Member
  • ****
  • Posts: 975
  • ObjAsm Developer
    • ObjAsm
Re: FIR Audio Spectrum Analyzer
« Reply #33 on: September 08, 2014, 09:26:58 PM »
Hi Marinus
D3D9_HM.exe works in FS and windowed mode. Some strange things happen when switching several times from one mode to the other, but basically it works.
Test version 3 & 4 from FIR_analyser didn't show any change compared to the previous one.

Biterider


Siekmanski

  • Member
  • *****
  • Posts: 2561
Re: FIR Audio Spectrum Analyzer
« Reply #34 on: September 08, 2014, 10:07:32 PM »
Thank you very much Biterider for testing.  :t
I now have a clue..... some graphic cards act differently in processing the data.
In the D3D9_HM.exe i did a sanity check and always check if i receive a message from the graphics card
and then restore all the vertex and index buffers and reset the graphics card.

Quote
D3D9_HM.exe works in FS and windowed mode. Some strange things happen when switching several times from one mode to the other, but basically it works.

This is an example i have hopefully solved that issue.  ( press F1 to toggle between windowed and full screen mode )

Marinus
Creative coders use backward thinking techniques as a strategy.

guga

  • Member
  • *****
  • Posts: 1449
  • Assembly is a state of art.
    • RosAsm
Re: FIR Audio Spectrum Analyzer
« Reply #35 on: September 08, 2014, 10:49:16 PM »
Beautiful App Marinus  :t
Coding in Assembly requires a mix of:
80% of brain, passion, intuition, creativity
10% of programming skills
10% of alcoholic levels in your blood.

My Code Sites:
http://rosasm.freeforums.org
http://winasm.tripod.com

Siekmanski

  • Member
  • *****
  • Posts: 2561
Re: FIR Audio Spectrum Analyzer
« Reply #36 on: September 08, 2014, 10:50:35 PM »
Thanks guga.
Creative coders use backward thinking techniques as a strategy.

Siekmanski

  • Member
  • *****
  • Posts: 2561
Re: FIR Audio Spectrum Analyzer
« Reply #37 on: September 08, 2014, 11:45:05 PM »
Hi Biterider,

I finally hope this one solves it............

Marinus
Creative coders use backward thinking techniques as a strategy.

Biterider

  • Member
  • ****
  • Posts: 975
  • ObjAsm Developer
    • ObjAsm
Re: FIR Audio Spectrum Analyzer
« Reply #38 on: September 09, 2014, 02:47:36 AM »
Hi Marinus
Good news, it works now  :t
What was the problem?

Biterider

Siekmanski

  • Member
  • *****
  • Posts: 2561
Re: FIR Audio Spectrum Analyzer
« Reply #39 on: September 09, 2014, 04:52:48 AM »
Apparently on some graphic cards the device is not direct operational and therefore rendering is not possible.
The device needs to be reset and have to restore all the vertex and index buffers.

I'll post the new source-code in the first post.

One request, did you test the D3D9_3DStars example in Reply #34 to solve the strange fullscreen toggle thingy ?
It's not easy to get everything working on all PC's
I'm very thankful for your patience to get my code in more working order.  :t
Creative coders use backward thinking techniques as a strategy.

Zen

  • Member
  • ****
  • Posts: 962
  • slightly red-shifted
Re: FIR Audio Spectrum Analyzer
« Reply #40 on: September 09, 2014, 05:43:15 AM »
SIEKMANSKI,   
Sorry about all the negative comments from me,...it's just that the concept of your FIR Audio Spectrum Analyzer is UBER COOL,...I wanted to write something similar once (in C++), and, I know how difficult DSP can be.   
...Anyway,...I'll mess around with your code when I get time,...and, try to get it to run on DirectX 11.
By the way,...D3D9_3DStars (above) runs perfectly on my machine (without any DirectX 9 dlls being loaded),...so, I'm fairly certain its just a version issue here. Don't worry about it.
...And, thanks for the source code.

Here are a number of informative Webpages:
Graphics APIs in Windows, MSDN
Where is the DirectX SDK?, MSDN Blog
Where is the DirectX SDK (2013 Edition)?, MSDN Blog
DirectX Installation for Game Developers, MSDN
Zen

qWord

  • Member
  • *****
  • Posts: 1475
  • The base type of a type is the type itself
    • SmplMath macros
Re: FIR Audio Spectrum Analyzer
« Reply #41 on: September 09, 2014, 05:52:29 AM »
The latest upload (which does handle D3DERR_DEVICELOST) does work perfectly (win7,x64), even when switching the monitor (the previous one did not work in such cases).


 
MREAL macros - when you need floating point arithmetic while assembling!

Siekmanski

  • Member
  • *****
  • Posts: 2561
Re: FIR Audio Spectrum Analyzer
« Reply #42 on: September 09, 2014, 06:05:19 AM »
Thanks qWord,

That's cool to know that monitor switching is working too.  :eusa_dance:

Hi Zen,
You can download "DirectX 9.0c End-User Runtime" from microsoft.com.
That should install all the libraries on your machine and solve your DSOUND.dll version problem.

D3D9_3DStars calls the d3d9.dll so there are DirectX 9 dlls on your machine.

Marinus
Creative coders use backward thinking techniques as a strategy.

Biterider

  • Member
  • ****
  • Posts: 975
  • ObjAsm Developer
    • ObjAsm
Re: FIR Audio Spectrum Analyzer
« Reply #43 on: September 09, 2014, 06:07:07 AM »
Hi Marinus
D3D9_3DStars.exe works here without problems. Changed several times from FS to windowed mode and all work seamlessly.

Biterider

Siekmanski

  • Member
  • *****
  • Posts: 2561
Re: FIR Audio Spectrum Analyzer
« Reply #44 on: September 09, 2014, 06:08:49 AM »
Thanks Biterider,

I'm a happy person now.  :biggrin: :biggrin: :biggrin:

Marinus
Creative coders use backward thinking techniques as a strategy.