How graphics is so perfect

Posted on 2002-05-07
Last Modified: 2010-04-02
Hi I have created an audio player software similar to Winamp. But I wonder how winamp has created the frequency display area which is so much synchronized with the audio output, and also has no flickering. I have minimum knowledge on graphics. Can anybody please help me with some techinques.
Question by:manas_ghosal

Expert Comment

ID: 6993772
it probably uses directx. flicker happens when you re-draw before the frame is complete, you can eliminate this by having 2 display buffers, one that is being drawn, one to draw in, swap when you finish drawing one... (directx and opengl both support this internally, look up double buffering)

LVL 32

Accepted Solution

jhance earned 50 total points
ID: 6994146
I don't think that WinAmp uses DirectX although jonnin's comments about it are accurate.  

I think they just use BitBlt to get a flicker free update.  The freq. display in WinAmp is not what I would consider "animation" where DirectX is needed to get BOTH flicker-free updates and a high enough frame rate for real-time realistic action.
LVL 32

Expert Comment

ID: 6994149
By the way, this is not really a C++ question.  You'd be better off asking questions like this in the Windows Programming topic area.  

C++ has nothing to do with Windows, graphics, or flicker.
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.


Expert Comment

ID: 6994326
If you are intrested in compact and very well tested implementation of double buffering look for CMemDc class written by Keth Rule?? ( I ma not sure how to spell his name)
You can find it on and other places.
It is used by number of people to achive flocker free drawing...

And yes, it is not C++ question...
Hope it helps...

Author Comment

ID: 6995817
I apologise for asking this question to c++ programmer experts. I intentionally asked the question to c++ experts bcause I am more concerned on making the synchronization between the audio output and the graphical display. How to make such synchronization?

Expert Comment

ID: 7011031
Two options:

Make your spectral analysis code quicker!

Or buffer the audio output so that when it is played you've already analysed it
LVL 32

Expert Comment

ID: 7011050

Your question grading record is dismal.  Why should any of the experts here spend time working on your questions?

Questions Asked 27
Last 10 Grades Given A A A B A C C C  
Question Grading Record 8 Answers Graded / 8 Answers Received

Why don't you spend some time and resolve these numerous outstanding questions?  Note that some of these are many months old:

Expert Comment

ID: 7011578
You logged in as recently as May 13, 2002 and we have asked that you finalize your open questions in April of this year.  Some of your open questions date back to the year 2000, and must be finalized.  ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101, Netminder or Mindphaser will return to finalize these if they are still open in 7 days.  Experts, please post closing recommendations before that time.

Below are your open questions as of today.  Questions which have been inactive for 21 days or longer are considered to be abandoned and for those, your options are:
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you, but may help others. You must tell the participants why you wish to do this, and allow for Expert response.  This choice will include a refund to you, and will move this question to our PAQ (Previously Asked Question) database.  If you found information outside this question thread, please add it.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question (if it has no potential value for others).
   --> Post comments for expert of your intention to delete and why
   --> YOU CANNOT DELETE A QUESTION with comments; special handling by a Moderator is required.

For special handling needs, please post a zero point question in the link below and include the URL (question QID/link) that it regards with details.
Please click this link for Help Desk, Guidelines/Member Agreement and the Question/Answer process.

Click you Member Profile to view your question history and please keep them updated. If you are a KnowledgePro user, use the Power Search option to find them.  

Questions which are LOCKED with a Proposed Answer but do not help you, should be rejected with comments added.  When you grade the question less than an A, please comment as to why.  This helps all involved, as well as others who may access this item in the future.  PLEASE DO NOT AWARD POINTS TO ME.

To view your open questions, please click the following link(s) and keep them all current with updates.

To view your locked questions, please click the following link(s) and evaluate the proposed answer.

*****  E X P E R T S    P L E A S E  ******  Leave your closing recommendations.
If you are interested in the cleanup effort, please click this link 
POINTS FOR EXPERTS awaiting comments are listed in the link below
Moderators will finalize this question if in @7 days Asker has not responded.  This will be moved to the PAQ (Previously Asked Questions) at zero points, deleted or awarded.
Thanks everyone.
Moderator @ Experts Exchange

Expert Comment

ID: 7146697
Force accepted

** Mindphaser - Community Support Moderator **

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Quicksort a dynamic deque 33 72
Embarcadero C++ Builder XE2 TDateTime 8 70
Which Linux flavors will this run on? 6 87
FMX TCameraComponent Problem 2 68
Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now