Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

What is the best way of implementing double buffer?

Status
Not open for further replies.

123music

Junior Member level 1
Joined
Jun 24, 2010
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,381
What is the best way of implementing double buffer?
Is it by defining two arrays or by two dimensional arrays?

Can anyone please post a sample code for me....
 

amraldo

Advanced Member level 4
Joined
Aug 29, 2004
Messages
1,185
Helped
145
Reputation
290
Reaction score
40
Trophy points
1,328
Location
Egypt
Activity points
5,880
Re: Double Buffer

two pointers wz enough space.
is famous for video output.
--
Amr
 

123music

Junior Member level 1
Joined
Jun 24, 2010
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,381
Re: Double Buffer

amraldo said:
two pointers wz enough space.
is famous for video output.
--
Amr
I didn't get you..Could you please explain....
 

amraldo

Advanced Member level 4
Joined
Aug 29, 2004
Messages
1,185
Helped
145
Reputation
290
Reaction score
40
Trophy points
1,328
Location
Egypt
Activity points
5,880
Re: Double Buffer

to send video to the output device.
You allocate 2 pointers with space enough for frame data.
You store data in a buffer while sending the other buffer to the driver.
In the next you switch the buffers. The one sending is now used for storing and vice-versa.
--
Amr
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top