Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

MP3 while playibg tic-tac-toe

Posted on 2004-09-10
10
291 Views
Last Modified: 2010-04-15
how do i start to write the code. By using c source only. I wanr to play tic-tac-toe while i also listen to my mp3.
0
Comment
Question by:HonAlan
  • 4
  • 3
  • 3
10 Comments
 
LVL 11

Assisted Solution

by:griessh
griessh earned 50 total points
ID: 12029881
Hi HonAlan,

If you are a beginner, I suggest you concentrate on the TTT algorithm and use WinAmp to listen to mp3 files.

======
Werner
0
 

Author Comment

by:HonAlan
ID: 12035545
i have done the TTT algorithm but not yet done the Vs com 1 as i donne how to make it think by its own. So to gain a higher grade for my project at sch.
0
 
LVL 3

Accepted Solution

by:
CmdrRickHunter earned 75 total points
ID: 12037233
best solution is griessh's: have someone else decode the mp3 =p
  time to impement: 5 seconds for an expert, 3 minutes for a begining (gotta find that mp3 player... now where is it hidden?)
next best solution: download someone else's mp3 playing library, learn multithreaded code (which is a PAIN), and implement TTT in one thread, and mp3 playing in the other.  Be aware that this will not be cross platform.
  time to implement: 1-2 days for an expert, 2-4 weeks for a beginner (depending on how good you are at picking up multithreading)
worst solution: find somewhere on the web that explains the exact mp3 format... be ready because there's 2 flavors with a few dozen different variants in each flavor.  Learn how to do audio output and buffering (openAL in linux, probably directsound in windows), learn to do multithreaded code (good multithreaded code, not the easy stuff for the "next best solution"), and decode the mp3, using the algorithm found online, on the fly... because you dont want to be decoding the entire mp3 into wav format all at once (huge memry waste), and play it... all while learning how to make the computer play TTT
   time to implement: 1-8 weeks for an expert, 2months-6years for a beginner (I shiver just looking at their algorithms).


As for good TTT thinkings...
1) can I win.  If I can win, then why bother with anything else... WIN
2) can my opponent win.  if he can win (and I can't - I got past step 1), then BLOCK IT
3) have "prefered" locations (it likes the middle better, so if its open, GRAB IT), or randomly pick an opening

you're welcome to try to make neural algorithms, or learning programs that look ahead a few moves, but its TTT for pete's sake.  Its been proven that unbeatable (albiet uncreative) algorithms can be build using 1 2 and 3
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

Author Comment

by:HonAlan
ID: 12042276
do u have the griessh's
0
 
LVL 3

Expert Comment

by:CmdrRickHunter
ID: 12079223
griessh?
0
 
LVL 11

Expert Comment

by:griessh
ID: 12083542
?
0
 

Author Comment

by:HonAlan
ID: 12087526
i need to play a song while i am playing a game in .c source
CmdrRickHunter say i need some 1 to help me decode the file and he call that griessh's
0
 
LVL 11

Expert Comment

by:griessh
ID: 12091479
I don't have code for you ... I suggested to ue WinAmp to listen to music. You can download WinApm from http://winamp.com/player

=====
Werner
0
 
LVL 3

Expert Comment

by:CmdrRickHunter
ID: 12104836
sorry, to clarify, if it doesn't make sense now:
>> best solution is griessh's: have someone else decode the mp3 =p
use griessh's solution : have winamp or annother program decode the mp3 in the background, withotu doing any coding.
griessh is just the name of the person who supplied the answer, not some code library or anything (well, I dont think griessh has made a public code library... have you? =p )
0
 
LVL 11

Expert Comment

by:griessh
ID: 12106647
not public ... my company wants to charge for then :-)
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Microsoft vcsetup.exe and vcssetup.exe 8 434
Problem in finding output of a program 11 106
why "." vs "->" 23 120
If a cell in a range equals "YES" return specific Test. 4 37
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.

809 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