Click here to Skip to main content
Click here to Skip to main content
Go to top

VideoGame: To develop the just Engine sound

, 23 Apr 2006
Rate this:
Please Sign up or sign in to vote.
Oki.lib is a lib to use of the programmers to use in their projects develops with visual study NET 2003 or advanced and vc6.

Introduction

Oki.lib is a library for programers who develope with visual study NET 2003 or newer and VC6.
It allows to manage sound files in graphic engines or videogames and can be used for commercial projects or study purpose.

Oki.lib contains DirectShow-based functions for handling .mp3, .wav, and .mid, and directSound/3D function for .wav.

The sound files have to be placed in the directory "Okisound" which is created in the main project directory automaticly after starting .exe.

The number of sound files this oki.lib version can handle is max 64 for DirectShow, 64 for DirectSound and 64 for DirectSound3D.

The initialization process is logged in the LogOki.htm on runtime.

Download sourcecode 2.70 Mb

Download demo 2.79 Mb

Distributed files:

Description files:
0. Oki_2003.vcproj
Example project
1. Oki.h
Header file to put in the plan vs
2. Oki.lib and Oki.dll
Files library and dll to include in the project vs
3. Oki.htm
Tutorial Oki.lib

Configuration:

- Put Oki.lib and Oki.dll in main saying of the plan vs
- To include Oki.lib in the options of the compiler

In order to include Oki.lib to go in the panel of configuration of the compiler to click the button key of the mouse on Project/propierties/linker/input
in Additional Dependencies to eliminate all the voices if there are and to copy these:

oki.lib
strmiids.lib
dsound.lib
dxerr9.lib
dxguid.lib
d3dx9.lib
d3d9.lib
Dinput8.lib
winmm.lib
comctl32.lib

To make this step for the compilation in debug and release

For the compilation in release go in the panel of configuration of the compiler click on:
C/C++\Code Generation
In Runtime Library to choose the voice:
Single-threaded (/ML)

For the compilation in debug go in the panel of configuration of the compiler click on:
C/C++\Code Generation
In Runtime Library to choose the voice:
Single-threaded Debug (/MLd)

to press the push-button Applies and OK

- To include in the project vs the header oki.h and in the main.cpp main to put this line
#include "oki.h"

Example code:

//Init Game
//-----------------code-------------------
// Initialise sound
Inizializzazione(DXUTGetHWND(), GetModuleHandle(NULL));
// play sound DirectShow
SoundPlay_Show(1, 0);
// play sound DirectSound
SoundPlay_Sound(1, true, 0, 22050, 0);
// play sound DirectSound3D
SoundPlay_Sound3D(1);
//----------------end code--------------------

As you see is a lot much simple. In the tutorial there are more complex examples in order to realize just the engine of the sound

Points of Interest:

Managed with DirectShow files sound .mp3, .wav and .mid.
DirectSound and DirectSound3D .wav

Update new version and faq/comments:
http://www.twork.it/public/oki/guestbook.asp

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

okayit60
Web Developer
Italy Italy
programmer

Comments and Discussions

 
QuestionOnline translator? PinmemberMike_V23-Apr-06 14:50 
AnswerRe: Online translator? PinmemberJoakim L23-Apr-06 19:29 
GeneralRe: Online translator? Pinmemberokayit6024-Apr-06 0:43 
AnswerRe: Online translator? Pinmemberokayit6023-Apr-06 23:19 
GeneralRe: Online translator? PinmemberMike_V24-Apr-06 3:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web02 | 2.8.140905.1 | Last Updated 23 Apr 2006
Article Copyright 2006 by okayit60
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid