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

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 - airsniper

Pages: [1]
1
Audio / Re: Recording stereo sound
« on: August 08, 2012, 09:06:22 am »
Thanks for the help. All working. :D

2
Audio / Re: Recording stereo sound
« on: August 07, 2012, 02:48:36 pm »
More details:

Building to ensure sources are up-to-date
Build succeeded
Selecting target:
Debug
Adding source dir: C:\Documents and Settings\p79180\Pulpit\SMFL\Code\
Adding source dir: C:\Documents and Settings\p79180\Pulpit\SMFL\Code\
Adding file: bin\Debug\Code.exe
Starting debugger:
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb 6.8
Child process PID: 500
Program received signal SIGSEGV, Segmentation fault.
In ntdll!RtlStartRXact () (C:\WINDOWS\system32\ntdll.dll)

In window Call Stack:

#0 7C91839E     ntdll!RtlStartRXact() (C:\WINDOWS\system32\ntdll.dll:??)
#1 00000000     0x00000040 in ??() (??:??)
#2 7C96FB98     ntdll!RtlpNtMakeTemporaryKey() (C:\WINDOWS\system32\ntdll.dll:??)
#3 7C94B244     ntdll!LdrFindEntryForAddress() (C:\WINDOWS\system32\ntdll.dll:??)
#4 00000000     0x00ab0000 in ??() (??:??)
#5 00000000     0x50000161 in ??() (??:??)
#6 00000000     0x00000040 in ??() (??:??)
#7 7C919C0C     ntdll!RtlpUnWaitCriticalSection() (C:\WINDOWS\system32\ntdll.dll:??)
#8 77C1C3C9     msvcrt!free() (C:\WINDOWS\system32\msvcrt.dll:??)
#9 00000000     0x00ab0000 in ??() (??:??)
#10 00000000    0x40000060 in ??() (??:??)
#11 00000000    0x00000040 in ??() (??:??)
#12 77C1C3E7    msvcrt!free() (C:\WINDOWS\system32\msvcrt.dll:??)
#13 00000000    0x00000040 in ??() (??:??)
#14 77C1C42E    msvcrt!malloc() (C:\WINDOWS\system32\msvcrt.dll:??)
#15 70B59649    operator new() (C:\Documents and Settings\p79180\Pulpit\SMFL\Code\sfml-audio.dll:??)
#16 70BB80FC    std::vector<short, std::allocator<short> >::_M_insert_aux() (C:\Documents and Settings\p79180\Pulpit\SMFL\Code\sfml-audio.dll:??)
#17 70B45BE4    sf::SoundBufferRecorder::OnProcessSamples() (C:\Documents and Settings\p79180\Pulpit\SMFL\Code\sfml-audio.dll:??)
#18 70B47FBB    sf::SoundRecorder::ProcessCapturedSamples() (C:\Documents and Settings\p79180\Pulpit\SMFL\Code\sfml-audio.dll:??)
#19 70B48044    sf::SoundRecorder::Run() (C:\Documents and Settings\p79180\Pulpit\SMFL\Code\sfml-audio.dll:??)
#20 663034B1    sf::Thread::ThreadFunc() (C:\Documents and Settings\p79180\Pulpit\SMFL\Code\sfml-system.dll:??)
#21 77C2A3B0    msvcrt!_endthreadex() (C:\WINDOWS\system32\msvcrt.dll:??)
#22 7C80B729    KERNEL32!GetModuleFileNameA() (C:\WINDOWS\system32\kernel32.dll:??)
#23 00000000    0x00000000 in ??() (??:??)

But i don't know what must  I to do

3
Audio / Re: Recording stereo sound
« on: August 07, 2012, 01:00:29 pm »
Process returned -1073741819 (0xC00000005)    execution time : 2.578 
 
for example.

4
Audio / Recording stereo sound
« on: August 07, 2012, 12:12:23 pm »
I have a problem with the recording of stereo sound. 
 
It is  code:

#include <SFML/Audio.hpp>
#include <iomanip>
#include <iostream>
int main( ){    
    if (sf::SoundRecorder::CanCapture() == false)
    {
        std::cout << "Sorry, audio capture is not supported by your system" << std::endl;
        return EXIT_SUCCESS;
    }  
    unsigned int SampleRate=48000;
    std::cout << "Press enter to start recording audio";
    std::cin.ignore(10000, '\n');
    sf::SoundBufferRecorder Recorder;    
    Recorder.Start(SampleRate);
    std::cout << "Recording... press enter to stop";
    std::cin.ignore(10000, '\n');
    Recorder.Stop();

    // Get the buffer containing the captured data
    const sf::SoundBuffer& Buffer = Recorder.GetBuffer();

   const short  int*hbuf;
   hbuf=Buffer.GetSamples () ;
 
   //Display 10 samples of captured sound
 
   int i;
   for (i=0; i<10;i++) std::cout << *(hbuf+i)<<"\n";

    // Display captured sound informations
    std::cout << "Sound information :" << std::endl;
    std::cout << " " << Buffer.GetDuration()      << " seconds"           << std::endl;
    std::cout << " " << Buffer.GetSampleRate()    << " samples / seconds" << std::endl;
    std::cout << " " << Buffer.GetChannelsCount() << " channels"          << std::endl;

    return EXIT_SUCCESS;
}

It works for:
CaptureDevice = alcCaptureOpenDevice (NULL, SampleRate, AL_FORMAT_MONO16, SampleRate)
 in SoundBufferRecorder

I have modified:
CaptureDevice = alcCaptureOpenDevice (NULL, SampleRate, AL_FORMAT_STEREO16, SampleRate)  in SoundBufferRecorder  and compiled SFML-audio,    but it does not work.
I think, I should do something else for stereo recording. I would be grateful for your help.

Pages: [1]
anything