Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 3rd, 2005, 10:38 AM   #1
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,869
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
Exclamation Pygame Load Sound

There must be some way to make it load sounds other then wav format? Am I missing something? Wav is terrible, the game music folder has already reached over 200 some megabytes. :mad:
Sane is offline   Reply With Quote
Old Aug 3rd, 2005, 12:03 PM   #2
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
Smile

You can zip them and load'em zipped. Python is all set up for that!
__________________
I looked it up on the Intergnats!
Dietrich is offline   Reply With Quote
Old Aug 3rd, 2005, 12:05 PM   #3
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,869
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
Zipping Wavs does absolutely nothing. I'll zip battle_2.wav, which is 31.8 megs ... now it is 28 megs. That's only a %12 reduction.

The ideal solution would be if Pygame reads MIDI, please to god make it so! That would change it from 31.8 megs to 0.068 megs. That's a %99.8 reduction!!!! :eek:


I can't continue on if it reads WAV. Because we are about a quarter done the music. That means we won't even be able to put the game on a CD, besides hoping people won't bother waiting the extremely long loading and installation times.

SUCCESS!

import os, pygame
pygame.mixer.init()

os.chdir('c:/documents and settings/owner/my documents/finale/')
print os.listdir('')

pygame.mixer.music.load('boss_1.mid')
pygame.mixer.music.play()

WOOT

Last edited by Pizentios; Aug 3rd, 2005 at 4:13 PM.
Sane is offline   Reply With Quote
Old Oct 28th, 2005, 1:12 PM   #4
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
Perhaps you could tie PyMedia into your program and use Oggs or MP3s?
Arevos is offline   Reply With Quote
Old Oct 28th, 2005, 4:48 PM   #5
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,869
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
Errr look at my code, Mp3s and MIDIs all work.
Sane is offline   Reply With Quote
Old Oct 28th, 2005, 5:24 PM   #6
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
Really? Now that's interesting. I didn't know pygame could handle MP3s natively.
Arevos is offline   Reply With Quote
Old Oct 29th, 2005, 9:36 PM   #7
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
Unhappy

Trouble in Paradise!
PyGame 1.7.1 on Windows does not handle .mid or .mp3 files, it tells me something about the latest PyGame version shipping an old SDL_mixer.dll, at least for Windows!
__________________
I looked it up on the Intergnats!
Dietrich is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:13 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC