aboutsummaryrefslogtreecommitdiffstats
path: root/src/base/UMusic.pas (unfollow)
Commit message (Collapse)AuthorFilesLines
2008-02-20- Resampling support addedtobigun1-5/+29
- DecodeStreams are closed now if they are not used anymore - Fixed the crash that occured when USDX was closed git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@875 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-02-12changed InitializeSound to be responsive to failed module initializations, jaybinks1-14/+39
and to remove the module and try again. EG... in my case, sound card driver problems. ALSA is installed but wouldnt open the audio device. now it fails, and the output module goes to the next available ( if there is any ) then gracefully fails to dummy. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@845 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-02-07Audio output working againtobigun1-2/+0
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@838 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-02-05General:tobigun1-423/+492
- cleanup and adaption of SingDrawOscilloscope Portaudio/SDL audio output: - stuttering in portaudio output has been fixed (SDL_MixBuffers cannot be used without initializing the SDL audio stuff first, so it is not usable with portaudio. Now SDL is used for audio-output instead of portaudio (although the file-name is UAudioPlayback_Portaudio.pas at the moment). - cleaner file closing - volume adjustment UMusic: - cleanup of the audio-interfaces - introduced TNoteType = (ntFreestyle, ntNormal, ntGolden) - some bug-fixes - introduced TSoundLibrary. This is library for all in-game sounds used by USDX. Instead of calling AudioPlayer.PlaySwoosh you should call AudioPlayer.PlaySound(SoundLib.Swoosh) now. You might call SoundLib.Swoosh.Play too, but this is not recommended at the moment because SoundLib.Swoosh could be nil if the file was not found. The SoundLibrary approach is much cleaner than the previous one. The AudioPlayer does not have to specify a Play... and Stop... method for every available sound anymore. In addition it is not an AudioPlayers responsibility to init the in-game sounds. URecord: - polish to english translation of some variables - CaptureSoundLeft/Right is CaptureChannel[0/1] now - TSoundCardInput -> TAudioInputDeviceSource - TGenericSoundCard.Input -> TGenericSoundCard.Source - autocorrelation algorithm more readable now - Clean-up of the audio-input interface - moved cloned code of the input-classes to one base class (TAudioInputBase) - Cleaner finalization - Start-/StopCapture will not crash anymore in the recording-options menu - Fixed several bugs in the autocorrelation stuff (e.g. wrong usage of $10000) - SzczytJest (now ToneValid) was not used correctly. ToneValid is set to true if a valid tone was found (= the sound was louder than the threshold -> no background noise). If i remember correctly the sound was accepted although the tone was invalid. So the old data was used although noone was singing. This resulted in some sort of ghost-singer effect. UIni: - moved TIni.Card to TScreenOptionsRecord.Card because it is not stored in the ini-file and will not be in the future. - TIni.CardList ist now TIni.InputDeviceConfig. The name cardlist was misleading because it just specifies input- but no output-devices. In addition a soundcard can have multiple input-devices (at least in linux). - bugfix on InputDeviceConfig (formerly CardList) usage. USDX expected that the indices of the corresponding elements in TIni.InputDeviceConfig[] and TAudioInputProcessor.Device[] were the same. This is wrong. If device 2 was defined at first place in the ini and device 1 at the second, the indices of the two arrays didn't match (they were swapped) erroneously. To fix this and to support the item listed below the index to TIni.InputDeviceConfig[] is now stored in TAudioInputDevice.CfgIndex. NOTE: InputDeviceConfig[] contains configurations of non-available (unplugged) devices. Iterate over TAudioInputProcessor.Device[] for available devices. - configurations of external devices that are not plugged in will not be deleted anymore. - multiple definitions of one device in the ini-file will not crash USDX anymore - CardList[I].ChannelL/R now are InputDeviceConfig[I].ChannelToPlayerMap[0/1]. I think the new name is more intuitive because it maps a channel to a player number. Now the both vars are joint to one array. Now it is possible to use loops to process them and we might support more than two input channels on one device in the future (if such devices exist) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@827 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-01-12bunch of smaller changes...jaybinks1-0/+1
some changes to song loading... Record global changed to singleton object started implementing mic volume display in Settings-Record hope this dosnt break anything.. :P git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@789 b956fd51-792f-4845-bead-9b4dfca2ff2c
2008-01-11changed from ffmpeg-free (audio) to ffmpeg-enabled (if turned on in ↵tobigun1-11/+101
switches.inc) version. BASS is used by default. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@786 b956fd51-792f-4845-bead-9b4dfca2ff2c
2007-12-17- removed hStream in favour of TAudioOutputStreamtobigun1-3/+5
- removed all this BASS-specific sound-names git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@708 b956fd51-792f-4845-bead-9b4dfca2ff2c
2007-12-07little bit of tidy up..jaybinks1-36/+22
added command line switch, to see what media interfaces are being used. moved RandomPCM Data generation to Visualizer class. added Visualization preset change, on new line ( may be a little to much... maybe we should do ever 4 or 16 bars or something ?) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@697 b956fd51-792f-4845-bead-9b4dfca2ff2c
2007-12-06gave priority to videos over Visualization...jaybinks1-2/+22
so now video plays back... and "V" will switch between Video ( or jpg ) background and visualization. this needs to be pressed on every song, as the state should be forgotten. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@687 b956fd51-792f-4845-bead-9b4dfca2ff2c
2007-12-06Visualizer changes (audio connection, some opengl fixes)tobigun1-1/+7
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@679 b956fd51-792f-4845-bead-9b4dfca2ff2c
2007-12-06conformed projectM to IVideoPlayback jaybinks1-2/+3
still needs a little work. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@678 b956fd51-792f-4845-bead-9b4dfca2ff2c
2007-12-05- Moved GetFFTData from IAudioInput -> IAudioOutput (it is used for the ↵tobigun1-6/+3
song-selection equalizer not for mic-input) - CaptureCard/StopCard is not visible to public anymore git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@668 b956fd51-792f-4845-bead-9b4dfca2ff2c
2007-11-01fixed failed buildsjaybinks1-0/+4
build:USDX-LAZLIN-75 build:USDX-LAZLIN-76 for some reason we can not use {$MODE Delphi} in an included file. ( Probably because of the way the compier scopes this switch to each pas file ) ive had to revert this part of eddies changes. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@548 b956fd51-792f-4845-bead-9b4dfca2ff2c
2007-11-01Mac OS X version compiles and links. I hope I didn't break too many files on ↵eddie-08151-4/+0
windows/linux. Added switches.inc to all files. Changed many IFDEFs. For Windows-only code please use MSWINDOWS instead of WIN32 now. WIN32 is also used by the Mac port. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@546 b956fd51-792f-4845-bead-9b4dfca2ff2c
2007-10-24modifed bitmap fonts to have alpha channel, after conversation with blindy.jaybinks1-55/+55
modified ultrastar.lpr to get linux version running as it should be ( after mods I did in windows ) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@525 b956fd51-792f-4845-bead-9b4dfca2ff2c
2007-10-16modified ffmpeg usage, to use interface same as bass...jaybinks1-36/+106
still needs some tidy up, but its working. :) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@515 b956fd51-792f-4845-bead-9b4dfca2ff2c
2007-10-11added UAudio_FFMpeg.pas as placeholder... ( Still has bass code in it.. ↵jaybinks1-20/+67
needs to be replaced with ffmpeg code ) UMusic ( And UAudio* ) files, now have proper IAudioPlayback and IAudioInput Interface enumeration. simply having the unit in the uses clause will make it available. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@506 b956fd51-792f-4845-bead-9b4dfca2ff2c
2007-10-11separated IAudioPlayback in to separate "Playback" and "Input" Interfacesjaybinks1-9/+30
( both interfaces provided by same TMusic_Bass class... git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@505 b956fd51-792f-4845-bead-9b4dfca2ff2c
2007-10-11Added IAudioPlayback Interface and implementation for BASS.jaybinks1-728/+74
Created "AudioPlayback" Global Singleton, which removed the need for the "Music" Global variable. This was done because global singleton objects are a recognized better "design pattern" achieving the same thing as global variables, but in a nicer way. I will be working to a) separate IAudioPlayback in to separate "Playback" and "Input" Interfaces b) build a FFMpeg class that implements IAudioPlayback git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@504 b956fd51-792f-4845-bead-9b4dfca2ff2c
2007-10-08fixed bad build build#USDX-DELPHI-31jaybinks1-3/+4
oops... git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@473 b956fd51-792f-4845-bead-9b4dfca2ff2c
2007-10-08minor changes to faciliate ffmpeg audio playbackjaybinks1-5/+102
jira#USDX-123 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@470 b956fd51-792f-4845-bead-9b4dfca2ff2c
2007-10-02Fixed linux compilation.jaybinks1-735/+738
Linux is now running in the main loop fine. * no audio playback or input yet... * Timing hack inplace.. that must be replace * bunch of textures not working.. however the play screen is looking similar to windows builds. I hope this dosnt break windows builds to much. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@460 b956fd51-792f-4845-bead-9b4dfca2ff2c
2007-09-29small fixes for lazarus build.jaybinks1-1/+1
cleanup on some code. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@445 b956fd51-792f-4845-bead-9b4dfca2ff2c
2007-09-20new lyrics stuff; it's broken (lyrics don't show) and in "debug" mode (weird ↵b1indy1-731/+735
stuff going on in the singscreen) but i'm tired of editing conflicts git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@412 b956fd51-792f-4845-bead-9b4dfca2ff2c
2007-09-20Ultrastar-DX now compiles in linux jaybinks1-625/+731
(using lazarus) Bass etc is commented out.. but it compiles, and im working through the runtime errors. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@408 b956fd51-792f-4845-bead-9b4dfca2ff2c
2007-09-19added UCommon ( in classes ) for lazarus...jaybinks1-4/+22
common functions needed for lazarus ( and others ) can be put in here. also this now compiles on lazarus.. ( dosnt link yet... but I dont get any critical compiler errors ) tested to compile in my delphi, and basic functionality is fine. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@395 b956fd51-792f-4845-bead-9b4dfca2ff2c
2007-09-18major tidy up of Umusic ... jaybinks1-234/+32
removes mplayer unit and dependency. tidy up of other units in move to compile in lazarus. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@392 b956fd51-792f-4845-bead-9b4dfca2ff2c
2007-09-02Some Cleanup in URecordwhiteshark01-1/+1
Some Cleanup in UMusic Some Cleanup in ProjectFile Upgrade from Bass 2.1 to Bass 2.3 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@361 b956fd51-792f-4845-bead-9b4dfca2ff2c
2007-07-20UGraphicClasses.pas: minor modification to Flare effectb1indy1-0/+1
UMusic.pas: modified Music.Play to play from start if Loop is set (dunno if this conflicts with something else, don't hope so) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@303 b956fd51-792f-4845-bead-9b4dfca2ff2c
2007-06-06Fixed some Bugs in Song Fadingwhiteshark01-3/+3
Added Ini Values to change the Fading and the Preview Volume git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@245 b956fd51-792f-4845-bead-9b4dfca2ff2c
2007-06-03Added SongPreview Fadingwhiteshark01-0/+13
Song Preview Max Volume is now 70 % Need Testing because of timing git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@243 b956fd51-792f-4845-bead-9b4dfca2ff2c
2007-05-16all SongFile Loading and Saving procedures moved to UFiles.whiteshark01-1/+1
Added Some Tolerance in Song File Loading and Song Header Loading. Fix: Programm doesn't Crash anymore when a coruppted Song is loaded for Singing or Editing. Now Jump back to SongScreen and show an Error Message. Also Party Mode is not Interupted, a new Song will be selected automatically. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@197 b956fd51-792f-4845-bead-9b4dfca2ff2c
2007-03-30Finished Code for Plugin Sound PlayBackwhiteshark01-2/+9
Removed Debug Message from ULanguage git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@50 b956fd51-792f-4845-bead-9b4dfca2ff2c
2007-03-25Changed Music.SetVolume from Global Wave Volume to Application-Only BassConfigwhiteshark01-1/+6
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@35 b956fd51-792f-4845-bead-9b4dfca2ff2c