Afterwarp Development  

Go Back   Afterwarp Development > Software/Game Development > Published Resources
Published Resources Post any source code, images and tools here that you want to share with the community.


 
 
Thread Tools Display Modes
  (#1) Old
Lazarus Lazarus is offline
Honoured
Lazarus is on a distinguished road
 
Lazarus's Avatar
 
Posts: 246
Join Date: Apr 2006
Location: Germany
Send a message via ICQ to Lazarus
Soundsystem for Asphyre - 24-Jun-2006, 09:22

Hi all,

i want to start a new way to implement Music and Sounds into a component.
So i have found a high level Audio-API that is open source (LGPL).
This means that you may freely use it in commercial products, as long as you do not modify the source code. If you do modify the source and release a product that uses your modifications, you must release your changes to the code under the LGPL as well.

The Asphyre-Sound Component should play:
Ogg, MP3, WAV, AIFF, FLAC, MOD, S3M, IT, XM, Speex Files using DirectSound and/or WinMM. If you use DirectSound you will have better Performance and with WinMM more compatibility. You can select the mode for your reasons...

In this way you are absolutely free to use it in Free-,Shareware and commercial projects without charge
I think that can be a good way... What do you think ???
I must have some meanings from this community because i have to check if anyone is interested before spending time to make it ready for Delphi (Component) and translate the bindings from C to Pascal...


Thank you...

Last edited by Lazarus; 24-Jun-2006 at 16:53.
  (#2) Old
Gugle Gugle is offline
Resourceful
Gugle is on a distinguished road
 
Posts: 36
Join Date: Apr 2006
25-Jun-2006, 11:36

Quote:
Originally Posted by Lazarus™
The Asphyre-Sound Component should play:
Ogg, MP3, WAV, AIFF, FLAC, MOD, S3M, IT, XM, Speex Files using DirectSound and/or WinMM. If you use DirectSound you will have better Performance and with WinMM more compatibility. You can select the mode for your reasons...
Hello Lazarus,
I have a working DirectShow/DirectSound combination, which means support for ANY KNOWN AND FUTURE sound formats through DirectShow filters. This also means freedom in constructing DirectShow graphs, ergo inserting custom DMOs in graph. Another good thing is an access to raw sound data, so the user can manipulate sound as he want. This includes spectrum analysis. Since the DirectShow is used only as a decompressor and not as a sound player, you can set up DirectSound buffer as you like before playing sounds. Since DirectSound buffer is exposed, user can apply real-time effects, pitch/volume/balance change, real 3D buffers, etc... All the nice things the DirectSound offers. This is a very good way for playing game sounds, because you can decompress most used sounds and load them into secondary DirectSound buffers just once, and play them with very small hit on system resources.

I do not have quality implementation yet, but I have working implementation. This includes DirectShow decompressor, and DirectSound player.

My opinion is that we should try to make "native" Asphyre sound system, because we can get better integration with existing components. It will take longer to finish the job, but at the end it will be... Well, we will see
  (#3) Old
Lazarus Lazarus is offline
Honoured
Lazarus is on a distinguished road
 
Lazarus's Avatar
 
Posts: 246
Join Date: Apr 2006
Location: Germany
Send a message via ICQ to Lazarus
Exclamation First Release of the Audiere Soundlib Component - 25-Jun-2006, 12:41

Hi Gugle,
yes of course. I have made the component now ready (first release) see attachment. If you are interested in the DirectSound/DirectMusic project, then...
...lets start. Please contact me via eMail or Messenger...


While making this code i have seen, that i will start from scratch now and will make a Soundlib without third-party libs. I know this is a long way, but i'am not too old I will start up now with the DirectSound Interfaces...

Here is the Component for the people who want a library absolutely free of charge... This Component is based on the Audiere Soundlibrary wich is under LGPL terms...
Attached Files
File Type: rar SoundLib.part1.rar (1.39 MB, 1035 views)
File Type: rar SoundLib.part2.rar (1.39 MB, 986 views)
File Type: rar SoundLib.part3.rar (1.07 MB, 1386 views)

Last edited by Lazarus; 25-Jun-2006 at 13:06.
  (#4) Old
Gugle Gugle is offline
Resourceful
Gugle is on a distinguished road
 
Posts: 36
Join Date: Apr 2006
28-Jun-2006, 22:41

Quote:
Originally Posted by Lazarus™
Hi Gugle,
yes of course. I have made the component now ready (first release) see attachment. If you are interested in the DirectSound/DirectMusic project, then... lets start. Please contact me via eMail or Messenger...
I'm back on the job around 15th july, and then I will send you a player component. You can use that time to think about how to organize a component properties. I think that we should implement basic properties (volume, pan, pitch, few effects), and expose sound buffer, so users can work with it directly until we finaly decide what and how will be implemented through wrapper.
  (#5) Old
Lazarus Lazarus is offline
Honoured
Lazarus is on a distinguished road
 
Lazarus's Avatar
 
Posts: 246
Join Date: Apr 2006
Location: Germany
Send a message via ICQ to Lazarus
29-Jun-2006, 09:01

Hi Gugle,
Yes fine. I am waiting for your code and i hope we (and also the comunity) can realize a nice soundsystem... I'am happy to make an project in team...
  (#6) Old
lordzero lordzero is offline
Honoured
lordzero is on a distinguished road
 
lordzero's Avatar
 
Posts: 428
Join Date: Apr 2006
Location: Petrópolis-RJ, Brazil
15-Jul-2006, 04:19

audiere is cool


Knowledge is power.
  (#7) Old
sourcecode sourcecode is offline
Professional
sourcecode is on a distinguished road
 
sourcecode's Avatar
 
Posts: 96
Join Date: Jul 2006
Location: Brazil
Send a message via MSN to sourcecode
Thumbs up 17-Jul-2006, 22:02

Great job Lazarus, i like much of this sound system.
I alter SoundSystem to start play sound with a especified previously volume, this is not a bug, is just a improvement. Without this i need to start sound first and setvolume after.

See:

1º:
Code:
FCount: Integer;
    LoadedSounds: Array of TSoundData;
    { change for start volume - 15/jul/2006 }
    FMaxVolume: Integer;     
    procedure SetMaxVolume(const Value: Integer);
    { end changes }
  protected
    function GetSoundTypeFromFileName(FileName: String): TSoundType;
 (...)
  published
    property MaxVolume: Integer read FMaxVolume write SetMaxVolume;
2º:
Code:
procedure TSoundSystem.Play(Idx: Integer; Looped: Boolean);
var Sound: TSoundData;
begin
  if (Idx > FCount - 1) or (FCount = 0)  then begin
    Error('Unable to play sound no.:  ' + IntToStr(Idx));
    Exit;
  end;
  Sound := LoadedSounds[Idx];
  { change for start volume - 15/jul/2006 }
  Sound.MaxVolume := Self.MaxVolume;
  { end changes }
  if (Assigned(Sound)) and (Assigned(Sound.SfxStream)) then begin
    Sound.Play(Looped);
  end else
    Error('Unable to play sound ' + Sound.Name);
end;
3º:
Code:
{ change for start volume - 15/jul/2006 }
procedure TSoundSystem.SetMaxVolume(const Value: Integer);
begin
   FMaxVolume := Value;
end;
{ end changes }
4º:
Code:
procedure TSoundData.Play(Looped: Boolean);
begin
  if Assigned(SfxStream) and not IsPlaying then begin
    SampleFile := AudiereCreateMemoryFile(SfxStream.Memory, SfxStream.Size);
    if Assigned(SampleFile) then begin
      SampleSource := AudiereOpenSampleSourceFromFile(SampleFile, FF_AUTODETECT);
      if Assigned(SampleSource) then begin
        OutputStream := AudiereOpenSound(AudioDevice, SampleSource, True);
        if Assigned(OutputStream) then begin
          { change for start volume - 15/jul/2006 }
          SetVolume(MaxVolume);
          { end changes }
          OutputStream.Ref;
          OutputStream.SetRepeat(Looped);
          OutputStream.Play;
        end;
      end;
    end;
  end;
end;
With this alterations, you can modify MaxVolume at main component and TSoundData set automatically before play the initial volume.

I atach the complet unit.

SoundSystem.pas
  (#8) Old
Lazarus Lazarus is offline
Honoured
Lazarus is on a distinguished road
 
Lazarus's Avatar
 
Posts: 246
Join Date: Apr 2006
Location: Germany
Send a message via ICQ to Lazarus
18-Jul-2006, 14:00

Hi Sourcecode,

thats a good idea. I will use the modificated version up to now ;-)

I have seen a lot of Downloads, but only some replies yet...

Thank you for your comment and also for the modification...

Last edited by Lazarus; 18-Jul-2006 at 14:06.
  (#9) Old
sourcecode sourcecode is offline
Professional
sourcecode is on a distinguished road
 
sourcecode's Avatar
 
Posts: 96
Join Date: Jul 2006
Location: Brazil
Send a message via MSN to sourcecode
18-Jul-2006, 16:57

I use your component in my project: http://www.afterwarp.net/forum/thread738.html

This is nice sound system, this may be merged in asphyre...
  (#10) Old
Lazarus Lazarus is offline
Honoured
Lazarus is on a distinguished road
 
Lazarus's Avatar
 
Posts: 246
Join Date: Apr 2006
Location: Germany
Send a message via ICQ to Lazarus
18-Jul-2006, 21:35

Yes of course, Audiere Soundsystem is a good candidate to be integrated in Asphyre V4 I think it's good enough for the most projects and is absolutely free (LGPL) opensource.

Next time Gugle and i will start a new project for DirectSound/DirectMusic and
i hope we find some people more to make a really full delphi-source Soundlib.
In this time i collect info's aboud Mod-,Ogg-,Mp3-,Waveformat and also all other noise-sources to implement a lot of Formats inside the new Library.
But i think it's a long way to have the first release and for this time i have made the Audiere Component ...

Last edited by Lazarus; 18-Jul-2006 at 22:22.
 

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



vBulletin® is copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com
Copyright (c) 2000 - 2016 Afterwarp Development. All rights reserved.