topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • August 21, 2018, 10:33 AM
  • Proudly celebrating 13 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Shed [ switch to compact view ]

Pages: [1] 2next
1
Hello guys (hello Mr. Mouser)

i think a good program or piece of coding must have this guidelines :

1) be small, load fast, run fast and do exactly the right thing for what it is coded (the task)
2) make a good use of resources of the machine....small size again and moderated use of the resources
3) It's a bonus if the interface is fancy and good designed (but not a must)
4) if don't need be installed (only the exe and binnary files for running) it's a Plus (old style EXE coding)
5) Dont will have NAG screens (sorry but i ate the reminder screens for registering etc)
6) be coded in C, C++, or Delphi .... all the rest of languajes it's crappy (Visual Basic for example, but i'm talking of running apps in Windows O.S., Perl, or Python or others are right as languajes....you catch it?)

3
Hello, I'm Shed aka Israel from BCB-Tools

i see much variety of programs, and the final "programs" see very un-finnished, i meant, we all can't have enough spare time for have it how we want and probably all of us have in mind some others enhacments for our own stuff....but in general, is a bunch of miscellaneus utils, ("and in variety, it's the taste" like we say here)....talking about my entries, the Mp3 portable Ripper is made mainly, because i usually listen a San Francisco Groove salad station and want have a CD audio session for listening on the car...the DosBox and ScummVM front end (mostly DOSBox front end) is made for make life easier when we're trying emulate a DOS console for abbandonware games....the other example, is only source-code testing TDx sound buffers (as a tutorial, learning reading the sources) and all this software is made some months before i know the contest, then i see the contest and send to the donationcoder FTP account....

perhaps i can sell it...but i preffer have totally freedom to make it if our relation enhanced with Borland...by the momment i made a lot of things only for have good utilities for daily work....and as freeware stuff ...

about my personal career, since i discovered Turbo C 3.0 of old DOS systems, i'm together with they because Borland compilers is neat and shiny...and the applications works with a failsafe rate very high....no surprises with bugs...

4
Borland C++ Builder Contest / Re: Crystal Reports
« on: July 03, 2006, 09:52 AM »
Hello, ...well i just use the "default" components called QReport on Pallete component, in c++ builder environment
and this is for "design" time....not dinamically....

1) drop a Qreport1 component on the desired form that ACT as Report preview

2) configure the properties accordly to your preferences (link to DataSources etc)

3) first, add the HEADER of the Report (this can be totally void (or empty))

4) once you add the Header band, you can ADD the other QRBand's that for example, related to a certain registers on a Table, will be repeated until the End of File (EOF) (in this case, the registers of the table will be repeated on diferent lines)
For this DATA VISUALIZATION, we'll use the TQRDBText component (text from a database or table) or if the text is always the same....use TQRLabel......also for Table listings (called SubDetail Band), you must link the BAND property called DataSet to the Table we're using....

5) add the FOOTER section for print the Page footer....

6) Eventually, if you need "listings" of registers, you must LINK the DataSet property of QRSubDetail Band to the specified table

for example, this is a example QReport Page, as you can see, have the header, one QRSubDetailBand and the Footer





And this is (like example only) a supposed Events and code lines "behind" the Report Page

void __fastcall TForm24::QRSubDetail1BeforePrint(TQRCustomBand *Sender,
      bool &PrintBand)
{
  int encontrado = 0;
  TLocateOptions opciones;
  opciones.Clear();


   DataModule1->Tabla_envases->First();
        encontrado = DataModule1->Tabla_envases->Locate("TIPO_ENV", DataModule1->MyTable_STOCK_SALIDAS->FieldByName("TIPO_ENV")->AsString, opciones);
        if(!encontrado) {   }
        else {

                     //Product found on table
                     //we take the value from table, and assign to PAK_TYPE
              PAK_TYPE->Caption = DataModule1->Tabla_envases->FieldByName("PAK_TYPE")->AsString;
              PAK_TYPE->Refresh();

              }

   ///////////////////if TIPO_ENV == "GRANEL" we print the Liters, else ...we print the units//////////////////////////////
   if(DataModule1->MyTable_STOCK_SALIDAS->FieldByName("TIPO_ENV")->AsString == "GRANEL")
    {
      QRLabel_num_litros->Caption = FormatFloat("##,###", DataModule1->MyTable_STOCK_SALIDAS->FieldByName("LTS_TOTAL")->AsFloat);
      QRLabel_num_litros->Refresh();
      Label_unidades->Caption = "";
      Label_unidades->Refresh();
      contador_productos++;
     }
   else { QRLabel_num_litros->Caption = ""; QRLabel_num_litros->Refresh();
          Label_unidades->Caption = DataModule1->MyTable_STOCK_SALIDAS->FieldByName("UNIDADES")->AsInteger;
          Label_unidades->Refresh();
          contador_productos++;
            }
}
//---------------------------------------------------------------------------



void __fastcall TForm24::QuickRep1BeforePrint(TCustomQuickRep *Sender,
      bool &PrintReport)
{

 //////////here we assign to Label_PUERTO, the value from a editbox located on Form30////////////////////////
 Label_PUERTO->Caption = Form30->Edit_PUERTO->Text;
 Label_PUERTO->Refresh();

}
//---------------------------------------------------------------------------

void __fastcall TForm24::FormShow(TObject *Sender)
{
 contador_productos = 0;
}
//---------------------------------------------------------------------------



5
Incredible, wonderful, state of Art in snap-audio-coding

Proudly made with C++ Builder, Bass Library and LMD Tools

You see it, and you want it!! (source code included)

The Mp3 Portable Ripper!!! (for donation coder contest) :D

features: ripping of mp3 shoutcast stations on the fly (you only need to know what mp3 station you want to record)...various time-measurement recordings until 15.000 seconds of recording time...

Uses: New music on your Car (burning the result to a CD disc), have your personal Mp3 ripper on your Flash-Rom or Mp3-Player and carry it to everyplace in your pocket...
Record your own favourite sessions on a single mp3 file...

current status: Working but not 100% finnished...download not available until Mouser or organizers review it...

6
Carol, Nudone...i make more "clear and a bit shiny" graphic....how does it look??

8
Developer's Corner / Re: c++ builder
« on: May 06, 2006, 06:56 PM »
of course the choice is clear like clean water.... c++ builder !



(yes i'm fan-member of builder fanclub) X-DD

9
and here the source code for main file

//---------------------------------------------------------------------------
// Author: Shed of BCB-Tools Pty. Ltd  round year 2005-2006
// Compiler: Made under Borland C++ Builder 6 Ent.
// Requeriments for rebuild:  LMD Tools SE 6.1 and TDx Libraries v1.70
// Requeriments for sound editting: Goldwave editor in any version...better recent.
// Copyright: use this code at your own convenience, greetings to BCB-Tools is
//            enough...enjoy with it... :)
//
// Not expect so much as you can see there in main screen...this program it's
// only a demonstration how to play multiple sounds with TDx Libs only...
// if you want modify for make your own version of this "jukebox" of sounds
// feel freely to do it...it's intended for this stuff...
// You can see that in sounds folder, you have more than in mainform...yes
// this is so because is for future editting and implementation...

// Thanks to people like Mouser and Donationcoder crew, Darren, ElPusher,
// Dosfreak, Paskuator, Drull, A78 etc etc
// for be there, and support me and my bad days ...thanks a lot guys ;)




#include <vcl.h>
#pragma hdrstop
#pragma link "TDx_Sound"
#pragma link "TDx_SoundBuffer"
#pragma link "TDSCaps"
#pragma link "TDSBufferDesc"
#pragma link "TDx_Sound_Library_Install"

#include "Unit1.h"

//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "LMDBaseEdit"
#pragma link "LMDButton"
#pragma link "LMDCustomBevelPanel"
#pragma link "LMDCustomButton"
#pragma link "LMDCustomComponent"
#pragma link "LMDCustomControl"
#pragma link "LMDCustomEdit"
#pragma link "LMDCustomExtSpinEdit"
#pragma link "LMDCustomFormFill"
#pragma link "LMDCustomMaskEdit"
#pragma link "LMDCustomPanel"
#pragma link "LMDFormFill"
#pragma link "LMDWndProcComponent"
#pragma link "TDSBufferDesc"
#pragma link "TDx_Sound"
#pragma link "TDx_SoundBuffer"
#pragma link "LMDCustomPanelFill"
#pragma link "LMDCustomParentPanel"
#pragma link "LMDPanelFill"
#pragma link "LMDSBar"
#pragma link "LMDBaseControl"
#pragma link "LMDBaseGraphicButton"
#pragma link "LMDControl"
#pragma link "LMDCustomShapeButton"
#pragma link "LMDShapeButton"
#pragma link "LMDBaseGraphicControl"
#pragma link "LMDClock"
#pragma link "LMDGraphicControl"
#pragma link "LMDBaseMeter"
#pragma link "LMDCustomProgressFill"
#pragma link "LMDProgressFill"
#pragma link "lmdsbar"
#pragma link "LMDButton"
#pragma link "LMDCustomBevelPanel"
#pragma link "LMDCustomButton"
#pragma link "LMDCustomControl"
#pragma link "LMDCustomPanel"
#pragma resource "*.dfm"

 //---------------------------------------------------------------------------
// DEBUGGING
//---------------------------------------------------------------------------
#define Msg(A)  {\
                if (StatusMemo->Text.Length()>30000) StatusMemo->Text = "";\
                StatusMemo->Lines->Add(A);\
                }

void volume_ramp(void);
TForm1 *Form1;

int tiempo_fade_off = 0;
long time_fade = 0;
float segundos_del_efecto = 0;
float counter_temp1 = 0;

HMUSIC cancion_actual;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{
 Form1->VolumeScrollBar->DoubleBuffered = True;
 Form1->DoubleBuffered = True;

///////////////////////////////////////This part only for BASS audio library /////////

  ShowMessage(BASS_GetVersion());
  if (BASS_GetVersion() != MAKELONG(2,0))
  throw Exception("No se pudo cargar la versión 2 de BASS");

  if (!BASS_Init(1, 44100, 0, Handle, 0))
  throw Exception("Error inicializando Bass Library");

///////////////////////////////////////////////////////////////////////////////////////

}
//---------------------------------------------------------------------------
void __fastcall TForm1::Dx_Sound1Create(TObject *Sender)
{
//Change the cooperative level and load the sounds into the buffers
Dx_Sound1->SetCooperativeLevel( Application->Handle, DSSCL_PRIORITY );
Dx_SoundBuffer1->CreateFromFile( ".\\snd\\rain_loop.wav", DSBufferDesc1, Dx_Sound1 );
Dx_SoundBuffer2->CreateFromFile( ".\\snd\\thunder.wav", DSBufferDesc2, Dx_Sound1 );
Dx_SoundBuffer3->CreateFromFile( ".\\snd\\medrain.wav", DSBufferDesc3, Dx_Sound1 );
Dx_SoundBuffer4->CreateFromFile( ".\\snd\\ocean_waves.wav", DSBufferDesc4, Dx_Sound1 );
Dx_SoundBuffer5->CreateFromFile( ".\\snd\\water_river.wav", DSBufferDesc5, Dx_Sound1 );
Dx_SoundBuffer6->CreateFromFile( ".\\snd\\birds1.wav", DSBufferDesc6, Dx_Sound1 );
Dx_SoundBuffer7->CreateFromFile( ".\\snd\\crickets.wav", DSBufferDesc7, Dx_Sound1 );
Dx_SoundBuffer8->CreateFromFile( ".\\snd\\port1.wav", DSBufferDesc8, Dx_Sound1 );

}
//---------------------------------------------------------------------------
void __fastcall TForm1::Dx_Sound1Destroy(TObject *Sender)
{
 if (Dx_SoundBuffer1->Created) Dx_SoundBuffer1->Destroy();
 if (Dx_SoundBuffer2->Created) Dx_SoundBuffer2->Destroy();
 if (Dx_SoundBuffer3->Created) Dx_SoundBuffer3->Destroy();
 if (Dx_SoundBuffer4->Created) Dx_SoundBuffer4->Destroy();
 if (Dx_SoundBuffer5->Created) Dx_SoundBuffer5->Destroy();
 if (Dx_SoundBuffer6->Created) Dx_SoundBuffer6->Destroy();
 if (Dx_SoundBuffer7->Created) Dx_SoundBuffer7->Destroy();
 if (Dx_SoundBuffer8->Created) Dx_SoundBuffer8->Destroy();
 if (Dx_SoundBuffer9->Created) Dx_SoundBuffer9->Destroy();
 if (Dx_SoundBuffer10->Created) Dx_SoundBuffer10->Destroy();

}
//---------------------------------------------------------------------------
void __fastcall TForm1::Dx_Sound1DSEnumerate(TObject *Sender, GUID *Guid,
      AnsiString DriverDescription, AnsiString DriverModule, void *Context,
      bool &Finished)
{
Msg( "Found Device: "+DriverDescription );
if (KnownDevices && KnownModules && KnownGuids)
    {
    KnownDevices->Add( DriverDescription );
    KnownModules->Add( DriverModule );
    KnownGuids->Add( (void*) Guid );

    DevicesListBox->Items->Add( DriverDescription+", ("+DriverModule+")" );
    }
else
    Finished = true;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormCreate(TObject *Sender)
{
 KnownDevices = new TStringList();
 KnownModules = new TStringList();
 KnownGuids = new TList();

 Msg( "Enumerating DirectSound devices..." );

KnownGuids->Clear();
KnownDevices->Clear();
KnownModules->Clear();
DevicesListBox->Items->Clear();

if (!Dx_Sound1->DSEnumerate( NULL )) Msg("No available DirectSound devices!");

ActiveDeviceLabel->Caption = "none";
TotalDevicesLabel->Caption = IntToStr(KnownDevices->Count);

Msg( "Found: "+IntToStr(KnownDevices->Count)+" DirectSound Devices" );
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormDestroy(TObject *Sender)
{
  if (Dx_SoundBuffer1->Created)
     Dx_SoundBuffer1->Destroy();
 if (Dx_SoundBuffer2->Created)
     Dx_SoundBuffer2->Destroy();
 if (Dx_SoundBuffer3->Created)
     Dx_SoundBuffer3->Destroy();
 if (Dx_SoundBuffer4->Created)
     Dx_SoundBuffer4->Destroy();
 if (Dx_SoundBuffer5->Created)
     Dx_SoundBuffer5->Destroy();


 if (Dx_Sound1->Created) Dx_Sound1->Destroy();

 if (KnownGuids) delete KnownGuids;
 if (KnownModules) delete KnownModules;
 if (KnownDevices) delete KnownDevices;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::DevicesListBoxClick(TObject *Sender)
{

  if (Dx_SoundBuffer1->Created)
     Dx_SoundBuffer1->Destroy();
 if (Dx_SoundBuffer2->Created)
     Dx_SoundBuffer2->Destroy();
 if (Dx_SoundBuffer3->Created)
     Dx_SoundBuffer3->Destroy();
 if (Dx_SoundBuffer4->Created)
     Dx_SoundBuffer4->Destroy();
 if (Dx_SoundBuffer5->Created)
     Dx_SoundBuffer5->Destroy();
 if (Dx_SoundBuffer6->Created)
     Dx_SoundBuffer6->Destroy();
 if (Dx_SoundBuffer7->Created)
     Dx_SoundBuffer7->Destroy();
 if (Dx_SoundBuffer8->Created)
     Dx_SoundBuffer8->Destroy();
 if (Dx_SoundBuffer9->Created)
     Dx_SoundBuffer9->Destroy();
 if (Dx_SoundBuffer10->Created)
     Dx_SoundBuffer10->Destroy();

 if (Dx_Sound1->Created) Dx_Sound1->Destroy();

NotCreatedLabel->Visible = !Dx_Sound1->Create( (GUID*) KnownGuids->Items[DevicesListBox->ItemIndex] );
}
//---------------------------------------------------------------------------
void __fastcall TForm1::CheckBox_lluviaClick(TObject *Sender)
{

  //Sound of hard rain, with floor stoned
 if(CheckBox_lluvia->Checked == True)
 {
   Dx_SoundBuffer1->SetVolume(0);
   Dx_SoundBuffer1->Play(0,DSBPLAY_LOOPING);
  }

 else {
        Dx_SoundBuffer1->Stop();
        }
}
//---------------------------------------------------------------------------
void __fastcall TForm1::CheckBox_med_rainClick(TObject *Sender)
{

 //Sound of light rain
 if(CheckBox_med_rain->Checked == True)
 {
   Dx_SoundBuffer3->SetVolume(0);
   Dx_SoundBuffer3->Play(0,DSBPLAY_LOOPING);
  }

 else {
        Dx_SoundBuffer3->Stop();
        }
}
//---------------------------------------------------------------------------
void __fastcall TForm1::CheckBox_oceanClick(TObject *Sender)
{
  //Relaxing with sound of waves breaking in the coast
 if(CheckBox_ocean->Checked == True)
 {
   Dx_SoundBuffer4->SetVolume(0);
   Dx_SoundBuffer4->Play(0,DSBPLAY_LOOPING);
  }

 else {
        Dx_SoundBuffer4->Stop();
        }
}
//---------------------------------------------------------------------------

void __fastcall TForm1::CheckBox_riverClick(TObject *Sender)
{
  // Small river, water sound
  if(CheckBox_river->Checked == True)
 {
   Dx_SoundBuffer5->SetVolume(0);
   Dx_SoundBuffer5->Play(0,DSBPLAY_LOOPING);
  }

 else {
        Dx_SoundBuffer5->Stop();
        }
}

//---------------------------------------------------------------------------
void __fastcall TForm1::CheckBox_cricketsClick(TObject *Sender)
{
  // Nice sound of Crickets at the grass
   if(CheckBox_crickets->Checked == True)
 {
   Dx_SoundBuffer7->SetVolume(0);
   Dx_SoundBuffer7->Play(0,DSBPLAY_LOOPING);
  }

 else {
        Dx_SoundBuffer7->Stop();
        }
}
//---------------------------------------------------------------------------




void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
  volume_ramp();
}
//---------------------------------------------------------------------------

void volume_ramp(void)
{
  int NOTT = -1;
  //This is the function of Volume Ramp to Down (silence)
  // tiempo_fade_off it's a counter for calculate time of volume decay
  // time_fade it's the interval of decreasing amount of volume
  // The reason to put in a TIMER component...is because this way...
  // meanwhile the Soundbuffer1 volume is down...you can continue working with
  // other controls of application...otherwise...for example if you put into a
  // function with a FOR loop the execution of program it's catched into the
  // loop...and you can't touch anything while the loop isn't finished.

  if(Form1->Dx_SoundBuffer1->Playing == True)
       {
     Form1->Dx_SoundBuffer1->SetVolume( time_fade );
     }
// Buffer nº2 it's reserved for one shot Fx
//  else if (current_buffer_playing[2] == True)
//   {
//     Dx_SoundBuffer2->SetVolume( time_fade );
//     }
  else if (Form1->Dx_SoundBuffer3->Playing == True)
   {
     Form1->Dx_SoundBuffer3->SetVolume( time_fade );
     }
  else if (Form1->Dx_SoundBuffer4->Playing == True)
   {
     Form1->Dx_SoundBuffer4->SetVolume( time_fade );
     }

  else if (Form1->Dx_SoundBuffer5->Playing == True)
   {
     Form1->Dx_SoundBuffer5->SetVolume( time_fade );
     }

  else if (Form1->Dx_SoundBuffer6->Playing == True)
   {
     Form1->Dx_SoundBuffer6->SetVolume( time_fade );
     }

  else if (Form1->Dx_SoundBuffer7->Playing == True)
   {
     Form1->Dx_SoundBuffer7->SetVolume( time_fade );
     }

  else if (Form1->Dx_SoundBuffer8->Playing == True)
   {
     Form1->Dx_SoundBuffer8->SetVolume( time_fade );
     }
  else if (Form1->Dx_SoundBuffer9->Playing == True)
   {
     Form1->Dx_SoundBuffer9->SetVolume( time_fade );
     }
  else if (Form1->Dx_SoundBuffer10->Playing == True)
   {
     Form1->Dx_SoundBuffer10->SetVolume( time_fade );
     }


  //Change the Volume bar, obtaining the range, multiply by -1 and adding to 0.
  //Because directX volume range it's from 0 to -10000 and the volume bar
  //it's numerated from 0 to 10000 (it allow us mantain the orientation of volumebar)
  //this is, MAX volume range on TOP of volume Bar.
  Form1->VolumeScrollBar->Position = 0 + (time_fade * NOTT);
  //counting
  tiempo_fade_off++;
  //and decreasing the volume slide
  time_fade-=90;

  //when tiempo_fade_off reach 60 steps...stop the buffersound
  if (tiempo_fade_off == 70)
   {
    Form1->Timer1->Enabled = False;
    Form1->Dx_SoundBuffer1->Stop();
    Form1->Dx_SoundBuffer2->Stop();
    Form1->Dx_SoundBuffer3->Stop();
    Form1->Dx_SoundBuffer4->Stop();
    Form1->Dx_SoundBuffer5->Stop();
    Form1->Dx_SoundBuffer6->Stop();
    Form1->Dx_SoundBuffer7->Stop();
    Form1->Dx_SoundBuffer8->Stop();
    Form1->Dx_SoundBuffer9->Stop();
    Form1->Dx_SoundBuffer10->Stop();

    //Restore the variables for a new volume ramp down
    tiempo_fade_off = 0;
    time_fade = 0;
    Form1->Timer1->Enabled = False;
     }
 }
void __fastcall TForm1::LMDButton5Click(TObject *Sender)
{
 Form1->Timer1->Enabled = True;
}

//---------------------------------------------------------------------------



void __fastcall TForm1::LMDShapeButton1Click(TObject *Sender)
{
 Form1->Close();
}
//---------------------------------------------------------------------------


void __fastcall TForm1::Timer2Timer(TObject *Sender)
{
  //This timer is used for control the time
  //for dissolve to silende fading out the
  //volume of Fx

 //Fade off the effects to silence
 Timer1->Enabled = True;

   // Reset the timer
 Timer2->Enabled = False;
 Timer2->Interval = 0;

}
//---------------------------------------------------------------------------

void __fastcall TForm1::LMDShapeButton2Click(TObject *Sender)
{
  //Destroy the buffer if created...and load the new sound (and play it :))
  if (Dx_SoundBuffer2->Created)
     Dx_SoundBuffer2->Destroy();
 Dx_SoundBuffer2->CreateFromFile( ".\\snd\\thunder.wav", DSBufferDesc2, Dx_Sound1 );
 Dx_SoundBuffer2->Play(0,0);
}
//---------------------------------------------------------------------------


void __fastcall TForm1::LMDShapeButton4Click(TObject *Sender)
{
  //Destroy the buffer if created...and load the new sound (and play it :))
   if (Dx_SoundBuffer2->Created)
     Dx_SoundBuffer2->Destroy();
 Dx_SoundBuffer2->CreateFromFile( ".\\snd\\birds1.wav", DSBufferDesc2, Dx_Sound1 );
 Dx_SoundBuffer2->Play(0,0);
}
//---------------------------------------------------------------------------


void __fastcall TForm1::LMDShapeButton3Click(TObject *Sender)
{
  //Destroy the buffer if created...and load the new sound (and play it :))
   if (Dx_SoundBuffer2->Created)
     Dx_SoundBuffer2->Destroy();
 Dx_SoundBuffer2->CreateFromFile( ".\\snd\\pass_page.wav", DSBufferDesc2, Dx_Sound1 );
 Dx_SoundBuffer2->Play(0,0);
}
//---------------------------------------------------------------------------



void __fastcall TForm1::LMDShapeButton5Click(TObject *Sender)
{
  //Destroy the buffer if created...and load the new sound (and play it :))
    if (Dx_SoundBuffer2->Created)
     Dx_SoundBuffer2->Destroy();
 Dx_SoundBuffer2->CreateFromFile( ".\\snd\\port1.wav", DSBufferDesc2, Dx_Sound1 );
 Dx_SoundBuffer2->Play(0,0);
}
//---------------------------------------------------------------------------

void __fastcall TForm1::VolumeScrollBarScroll(TObject *Sender,
      TScrollCode ScrollCode, int &ScrollPos)
{
   Volume = 0;
  Volume = Volume - VolumeScrollBar->Position;
 Dx_SoundBuffer1->SetVolume( Volume );
 Dx_SoundBuffer2->SetVolume( Volume );
 Dx_SoundBuffer3->SetVolume( Volume );
 Dx_SoundBuffer4->SetVolume( Volume );
 Dx_SoundBuffer5->SetVolume( Volume );
 Dx_SoundBuffer6->SetVolume( Volume );
 Dx_SoundBuffer7->SetVolume( Volume );
 Dx_SoundBuffer8->SetVolume( Volume );
 Dx_SoundBuffer9->SetVolume( Volume );
 Dx_SoundBuffer10->SetVolume( Volume );
}
//---------------------------------------------------------------------------


void __fastcall TForm1::CheckBox_Birds1Click(TObject *Sender)
{
   // Sound of Birds at the Woods
   if(CheckBox_Birds1->Checked == True)
 {
   Dx_SoundBuffer6->SetVolume(0);
   Dx_SoundBuffer6->Play(0,DSBPLAY_LOOPING);
  }

 else {
        Dx_SoundBuffer6->Stop();
        }
}
//---------------------------------------------------------------------------


void __fastcall TForm1::LMDShapeButton6Click(TObject *Sender)
{
  //Destroy the buffer if created...and load the new sound (and play it :))
    if (Dx_SoundBuffer2->Created)
     Dx_SoundBuffer2->Destroy();
 Dx_SoundBuffer2->CreateFromFile( ".\\snd\\Klick.wav", DSBufferDesc2, Dx_Sound1 );
 Dx_SoundBuffer2->Play(0,0);
}
//---------------------------------------------------------------------------

void __fastcall TForm1::LMDShapeButton7Click(TObject *Sender)
{
   //Destroy the buffer if created...and load the new sound (and play it :))
    if (Dx_SoundBuffer2->Created)
     Dx_SoundBuffer2->Destroy();
 Dx_SoundBuffer2->CreateFromFile( ".\\snd\\shorty_cat.wav", DSBufferDesc2, Dx_Sound1 );
 Dx_SoundBuffer2->Play(0,0);
}
//---------------------------------------------------------------------------

void __fastcall TForm1::LMDShapeButton18Click(TObject *Sender)
{
 ShowMessage("This is an multi-fx ambient simulator, just press buttons...");       
}
//---------------------------------------------------------------------------

void __fastcall TForm1::CheckBox_PuertoClick(TObject *Sender)
{
   //Sound of port ambience with seagulls etc...
 if(CheckBox_Puerto->Checked == True)
 {
   Dx_SoundBuffer8->SetVolume(0);
   Dx_SoundBuffer8->Play(0,DSBPLAY_LOOPING);
  }

 else {
        Dx_SoundBuffer8->Stop();
        }
}
//---------------------------------------------------------------------------

10

Another app for contest...showing how code and play some audio buffers with c++ builder, TDx Library and LMD Tools....

- source code project included...
- not finnished application...see better like code tutorial demo.


11
Very interesting Marco....

it seems very useful (and more for edu stuff)

thanks and good luck in contest!  :Thmbsup:

12



This is my own banner....hope you like it ...



13
Borland C++ Builder Contest / Re: Random MixTape Maker
« on: April 21, 2006, 08:18 PM »
many thanks ! :up:

hmmm...another competitor...

14
Borland C++ Builder Contest / Re: Learning C++ Builder
« on: April 20, 2006, 05:16 AM »
Deozaan:

Do you see the Narnia's Chronicles PC demo ?...it have in "sounds" directory all sounds in wav format...perfect for choose someones for your own game-sounds ]:) 

sounds like wind effect, broken woods, coins, sounds of hits

...etc



15
Borland C++ Builder Contest / Re: Learning C++ Builder
« on: April 19, 2006, 10:12 AM »
yes...but i don't know if the compiler have it....

well...at least the CodeCompletion have (right click on codecompletion window)

- Sort by Scope
- Sort by Name

16
Borland C++ Builder Contest / Re: Learning C++ Builder
« on: April 19, 2006, 07:24 AM »
b) how to have listed functions ordered alphabetically?

you can made a standalone utility for it...like this...

then

1) got to *.H or HPP header file...Ctrl+C for copy the block of functions, and paste on this memo,

2) click on button1 (for sort the Memo (results will be duplicated/added to Memo1 text....then you copy and replace at Header file)

very tricky...sure...function_array only manages 100 lines...take care with this

//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "Unit1.h"
#include <string.h>
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;

int sort_function( const void *a, const void *b);
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button1Click(TObject *Sender)
{
 char function_array[100][150];
 AnsiString TEMP_STRING;
 int lines_of_memo=0;
 int counter_1 = 0;

 lines_of_memo = Memo1->Lines->Count;

 if(lines_of_memo <= 0)
  { ShowMessage("memo is empty"); return;}

 Memo1->Lines->Add("******************************************************************************");

 while(counter_1 < lines_of_memo)
 {
   TEMP_STRING = Memo1->Lines->Strings[counter_1].c_str();
   strcpy(function_array[counter_1], TEMP_STRING.c_str());
   counter_1++;
   }

  int  x;

   qsort((void *)function_array, lines_of_memo, sizeof(function_array[0]), sort_function);
   for (x = 0; x < lines_of_memo; x++)
      Memo1->Lines->Add(function_array[x]);

   Memo1->Refresh();
}
//---------------------------------------------------------------------------


int sort_function( const void *a, const void *b)
{
   return( strcmp((char *)a,(char *)b) );
}
void __fastcall TForm1::Button2Click(TObject *Sender)
{
 Memo1->CopyToClipboard();       
}
/


17
Looks pretty nice and realistic Gerome....very cool  :)

18
thanks....it's made on the fly....for donationcoder casebrief stuff.... :Thmbsup:

19
Borland C++ Builder Contest / Re: Learning C++ Builder
« on: April 19, 2006, 03:12 AM »
hello...looks...some differences between pascal and c++

- In C/C++ lenguage, you use 'Include' directive for include files with header files (i think in Delphi this is PAS Units but don't know very well.....)

- C++ uses open and close brackets ---- {    and    } for delimit blocks.....not Begin and End

- properties are referenced by -> operator...

   but also, accesing to some structure members or conversion routines in execution...can be obtained with '.' character

    example accessing a property in a TTable component:

TTable->Filtered = True;   //enabling filtering for Table

    example accessing format converting method:

AnsiString String_question = "Pascal or C++?? that's the question";
char other_string[200];
   
            other_string = String_question.c_str();  //we're converting from Ansistring type, to C standard formatted string
                                              // some others are -----   .ToInt()
                                              //                                  .ToDouble();   ... etc...
           


- the end of line in C and C++ it's always marked with ';' character

- assign to variables ...is not ':=' operator....just '=' operator for assign the value....or '==' operator to compare with something

- Strings are delimited by double quotation character ....not simple quotation....except in some cases...


hope this helps you understand C++ code

20
Perhaps, some people say....wow...Visual Programming it's very hard for me....i need begin older stylish...with a console application, (ok good...the IDE of C++ Builder also allow console applications....)

For it, you need Click on the main top menu File->New->Other ....and select Console Wizard (this is for generating the new project for a console application)

Console wizard allows select kind of languaje (C or C++) and if it's multithreaded, etc...

when you create the console, you've the standard *.c    or    *.cpp file for procedural coding

here, you can write old style coding...things like main function with arguments....void main(int argc, char argv[])...
this is,...C standard coding...

//---------------------------------------------------------------------------

#pragma hdrstop
#include <conio.h>
#include <stdio.h>

//---------------------------------------------------------------------------

#pragma argsused
int main(int argc, char* argv[])
{
 int x = 0;

  clrscr(); //this function clear the text screen

  for(x=1; x<12; x++)
  {
    //we use gotoxy function for place the cursor
    //and print 12 Hello world to screen

    gotoxy(30,x);
    printf("hello world");

  }

  getch(); //wait keystoke by user for exit
}

21
Borland C++ Builder Contest / Re: Learning C++ Builder
« on: April 19, 2006, 01:38 AM »
Yes ...my example (MIDI files playback) it's made with Borland C++ Builder compiler (the easy and powerfull way to have the truly C++ visual coding at your fingertips)

Visual programming, means that compiler have special helpers or procedures to help you developing applications, but NOT means "all is made for you simply clicking the mouse" ...mostly, you must KNOW what are you doing for add your OWN functions (written by you)

important things you must know, is that compiler, have following main things:

1st) have some kind of C and C++ knowledges (for this i recommend begin with a User's Manual for C languaje and after study and practice with console applications, try with C++ lenguaje (that is like C but with more things and Object Oriented programming)

- IDE (Integrated Development Environment)  This is the Main Pannels etc when you start the C++ Builder compiler

- VCL (Visual Component Library) it's the standard function library available into the IDE, it have the components and functions               
                                              that you'll use in your projects.

This is the COMPONENT PALLETTE and IDE menu, (with the AsyncPro components...this is a 3rd party component library


- COMPONENTS (it's like library functions (known as VCL) that have the necessary code to MAKE some kind of work)
           |         (for example, we have components for make a FTP connection to a server, a visual GRID for view data, etc)
           |             This components, are sorted by a TABBED control, with different sections,
           |              (Standard, FastNet, BDE, Interbase, Office,...etc etc)
           |   
           |              One thing that you must have in mind, is that the Component VCL can be "extended" with components       
           |                  developed by 3rd party components....
           |
           |--->Properties  (define some things for each component....for example FONT property defines with kind of Font                         
           |                                have the component....(size, bold, font type etc...)                                           
           |
           |--->Events (for each component in application, happens some kind of events, for example, OnClick event,
           |                             manage what will DO the component, when the user Clicks with Mouse on it)
           |
           |--->Methods (it's some "internal" functions that the component have into....for example the Method for a
                                           TTable component (that manage a DataBase Table), have the method TTable->First();                       
                                            that positioning the selected registry of the Table, to First registry on the Table.


- IDE Options for Compile, Debugging, and editting your project source code files,

- F1 Help File system (once you're developing, perhaps you NEED know something about some function or parameter or something....for help you, C++ Builder have a Visual Help File, that contains help system for all functions, and things related to development environment....it's usefull know a bit this file, for further use when you don't know use a function or something

Also you must know the difference between DESIGN and RUNTIME modes....for example, a control can be VIEWED at Design Mode, but in Runtime mode can't be visible (it's there, but HIDDEN.....(visible propertie = False))

And remember...if you're thinking to introduce programming world, you must have another thing in mind-...

READ THE DOCUMENTATION of USE

what i'm saying...yes...exactly your'e reading...common attitude on people...is want make things BEFORE read the user manual or README files....it's important know if you're thinking make things, know how it works is essential....no?

Then, just before playing with a thing....take a view to Documentation of use....some times this save you a lot of hours...


Also, important to remember, if you have enough "skilled" you can build your own components at your own convenience, but if you're not expert coder, it's a bit difficult made this...

22
If i show you my Tic Tac Toe implementation in a Olivetti-M20 machine...that's older and antique stuff ;D

The problem is that this machine "died" some years ago (but don't have HD... and something like CGA graphic cards not invented neither....

anyway...make this hit at early age (12 years old) something that career people still don't know how code ....it's a reason to be peacefully in my mind ...heehhe

really i'm so OLD???!?....let me take a view to mirror....

23
HOW PLAY MUSIC MIDI IN OUR BUILDER APPLICATIONS
-----------------------------------------------------------------------------------------------------------------------

Select the MediaPlayer Component....from SYSTEM Tab....and Drop into main Form of the applicacion....

The Form looks now with the MediaPlayer component with this visible buttons.....



Follow we can modify the property .......MediaPlayer->AutoOpen to True

Then when the Form loads , the MediaPlayer is opened automatically when the application starts....



Also we need a *.MID file for music playing.......you have a midi song included with the source code here:

http://www.cyberscop...dune/images/Tutorial - Playing Midi Files.zip

 This Midi song, it's assigned to MediaPlayer->Filename property...

If you want "don't show" the component, then you must assign -False- to Visible property in properties Editor

(for example for background music ambience or other buttons pre-defined by you....)




Finally, we starts reproduction in constructor of MainForm

//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{

MediaPlayer1->Open();
MediaPlayer1->Play();
}
//---------------------------------------------------------------------------




//And we've done! Midi Music playing!

24
thanks a lot...

do you think in something like merchandising Tshirts? (i use the 5th Grader BOLD FONT)

something like this...


25
ScummVM: it's a kind of emulator for some games based on Scumm system developed in LucasArts graphic adventures originally, and used for other games like Beneath a Steel Sky, Monkey Island, Maniac Mansion, Day of the Tentacle...etc

This games, don't work usually in Windows XP systems, but with this emulator, you can execute on Windows XP fine...

Your need have 3 things:

ScummVM
-------------------------------------------------------------------------------------------------------------------------
http://www.scummvm.org/




ScummVM Front End (optional) allow you configurate the various reescaling and filter modes
-------------------------------------------------------------------------------------------------------------------------
well...as the same way of DOSBox Front End...this other FrontEnd acts same way for ScummVM emulator



http://www.cyberscope-station.com/frikidune/abbandonwarePC/scummvm_frontened_by_Shed.zip


-------------------------------------------------------------------------------------------------------------------------
and the DOS games mentioned....that can found at Abbandonware websites and resources on network

Pages: [1] 2next