doe300 / ohmcomm Goto Github PK
View Code? Open in Web Editor NEWPlatform-independent voice-over-IP peer-to-peer communication program
License: MIT License
Platform-independent voice-over-IP peer-to-peer communication program
License: MIT License
Few things to clear up:
Few things to fix:
After making AudioProcessor::configure virtual, to provide overriding functionality in ProcessorOpus for the initialisation of encoder/decoder objects (see #18 ). The Programm crashes with an Access violation executing.
Thrown after executing RtAudioWrapper::prepare() at line 369.
Object Informations:
- this 0x00551778 {semaphore_waitForMainThread=0x00000104 semaphore_waitForWorkerThread=0x00000108 bufferAudioOutput=...} RtAudioWrapper *
- AudioHandler {flagAudioConfigSet=true flagPrepared=true audioProcessors={ size=2 } ...} AudioHandler
- __vfptr 0x013dce78 {OHMComm.exe!const RtAudioWrapper::`vftable'} {0x01332149 {OHMComm.exe!RtAudioWrapper::startRecordingMode(void)}, ...} void * *
[0] 0x01332149 {OHMComm.exe!RtAudioWrapper::startRecordingMode(void)} void *
[1] 0x01331433 {OHMComm.exe!RtAudioWrapper::startPlaybackMode(void)} void *
[2] 0x01331b4f {OHMComm.exe!RtAudioWrapper::startDuplexMode(void)} void *
[3] 0x01331686 {OHMComm.exe!RtAudioWrapper::setConfiguration(struct AudioConfiguration const &)} void *
[4] 0x01331852 {OHMComm.exe!RtAudioWrapper::suspend(void)} void *
[5] 0x013310ff {OHMComm.exe!RtAudioWrapper::resume(void)} void *
[6] 0x013313e8 {OHMComm.exe!RtAudioWrapper::stop(void)} void *
[7] 0x013316f9 {OHMComm.exe!RtAudioWrapper::reset(void)} void *
[8] 0x01331e56 {OHMComm.exe!RtAudioWrapper::playData(void *,unsigned int)} void *
[9] 0x0133218f {OHMComm.exe!RtAudioWrapper::setDefaultAudioConfig(void)} void *
[10] 0x01331596 {OHMComm.exe!RtAudioWrapper::prepare(void)} void *
[11] 0x0133184d {OHMComm.exe!RtAudioWrapper::getBufferSize(void)} void *
flagAudioConfigSet true bool
flagPrepared true bool
- audioProcessors { size=2 } std::vector<AudioProcessor *,std::allocator<AudioProcessor *> >
[size] 2 int
[capacity] 2 int
- [0] 0x0043fafc {networkObject=0x00551ab0 {Socket=292 localAddress={sin_family=2 sin_port=14640 sin_addr=...} ...} ...} AudioProcessor *
- [ProcessorRTP] {networkObject=0x00551ab0 {Socket=292 localAddress={sin_family=2 sin_port=14640 sin_addr={S_un={...} } ...} ...} ...} ProcessorRTP
+ AudioProcessor {name="RTP-Processor" } AudioProcessor
+ networkObject 0x00551ab0 {Socket=292 localAddress={sin_family=2 sin_port=14640 sin_addr={S_un={S_un_b={...} S_un_w=...} } ...} ...} NetworkWrapper *
+ rtpPackage 0x00000000 <NULL> RTPPackageHandler *
+ rtpBuffer 0x00551598 unique_ptr {bufferMutex=0x00000128 ringBuffer=0x00564108 {isValid=true (205) header={version=1 padding=1 extension=...} ...} ...} std::unique_ptr<RTPBuffer,std::default_delete<RTPBuffer> > *
- __vfptr 0x013dcc00 {OHMComm.exe!const ProcessorRTP::`vftable'} {0x0133110e {OHMComm.exe!ProcessorRTP::getSupportedAudioFormats(void)}, ...} void * *
[0] 0x0133110e {OHMComm.exe!ProcessorRTP::getSupportedAudioFormats(void)} void *
[1] 0x01331208 {OHMComm.exe!ProcessorRTP::getSupportedSampleRates(void)} void *
[2] 0x013322a2 {OHMComm.exe!AudioProcessor::configure(struct AudioConfiguration)} void *
[3] 0x0133143d {OHMComm.exe!ProcessorRTP::processInputData(void *,unsigned int,struct StreamData *)} void *
[4] 0x013310be {OHMComm.exe!ProcessorRTP::processOutputData(void *,unsigned int,struct StreamData *)} void *
+ name RTP-Processor std::basic_string<char,std::char_traits<char>,std::allocator<char> >
- [1] 0x0043fabc {OpusEncoderObject=0x0056ed60 {celt_enc_offset=42784 silk_enc_offset=18220 silk_mode={nChannelsAPI=...} ...} ...} AudioProcessor *
- [ProcessorOpus] {OpusEncoderObject=0x0056ed60 {celt_enc_offset=42784 silk_enc_offset=18220 silk_mode={nChannelsAPI=2 ...} ...} ...} ProcessorOpus
+ AudioProcessor {name="Opus-Processor" } AudioProcessor
+ OpusEncoderObject 0x0056ed60 {celt_enc_offset=42784 silk_enc_offset=18220 silk_mode={nChannelsAPI=2 nChannelsInternal=...} ...} OpusEncoder *
+ OpusDecoderObject 0x0057bb40 {celt_dec_offset=8628 silk_dec_offset=84 channels=2 ...} OpusDecoder *
OpusApplication 2048 int
+ ErrorCode 0x0043f92c {0} int *
lengthEncodedPacketWorkaround 3435973836 unsigned int
- __vfptr 0x013dcbe4 {OHMComm.exe!const ProcessorOpus::`vftable'} {0x013314ce {OHMComm.exe!ProcessorOpus::getSupportedAudioFormats(void)}, ...} void * *
[0] 0x013314ce {OHMComm.exe!ProcessorOpus::getSupportedAudioFormats(void)} void *
[1] 0x01331591 {OHMComm.exe!ProcessorOpus::getSupportedSampleRates(void)} void *
[2] 0x0133229d {OHMComm.exe!ProcessorOpus::configure(struct AudioConfiguration)} void *
[3] 0x013316b3 {OHMComm.exe!ProcessorOpus::processInputData(void *,unsigned int,struct StreamData *)} void *
[4] 0x01331e10 {OHMComm.exe!ProcessorOpus::processOutputData(void *,unsigned int,struct StreamData *)} void *
+ name Opus-Processor std::basic_string<char,std::char_traits<char>,std::allocator<char> >
+ [Raw View] 0x00551780 {...} std::vector<AudioProcessor *,std::allocator<AudioProcessor *> > *
+ audioConfiguration {outputDeviceID=1 inputDeviceID=6 outputDeviceChannels=2 ...} AudioConfiguration
semaphore_waitForMainThread 0x00000104 void *
semaphore_waitForWorkerThread 0x00000108 void *
bufferAudioOutput 0x0056cf20 void *
BufferAudioOutHasData false bool
+ rtaudio {rtapi_=0x00551b38 {coInitialized_=true deviceEnumerator_=0x0055acf8 <Information not available, no symbols loaded for MMDevAPI.dll> } } RtAudio
+ input {deviceId=6 nChannels=2 firstChannel=0 } RtAudio::StreamParameters
+ output {deviceId=1 nChannels=2 firstChannel=0 } RtAudio::StreamParameters
outputBufferByteSize 7680 unsigned int
inputBufferByteSize 7680 unsigned int
+ streamData 0x005630d8 {nBufferFrames=0 streamTime=0 maxBufferSize=0 } StreamData *
Unhandled exception at 0x7547CB49 in OHMComm.exe: 0xC0000005: Access violation executing location 0x00000000.
Based on code 7fc2e64
Optionally log profiling/statistics to a file.
Currently both computers need to have the same audio configuration (sample-rate, format, samples per package).
We need to find a way to either
Possible solutions:
See #35
Application crashes on exit.
Test the Project under the new Visual Studio 2015 (Released 20. Juli 2015)
Setup folder structure for LaTeX and add to git.
Configure page layout, design, text form (report)
How about marking all abstract/interface-like classes with an pre- or suffix.
For example:
RTPBufferHandler -> I_RTPBuffer
We need better error-handling, particular in these places:
We either could crash the program with informative errors or gracefully shutdown all the running threads and exit the program
On my local machine, same error as Travis-CI:
opus/libsilk_float.a(encode_frame_FLP.c.o): In function `silk_encode_frame_FLP':
xxx/OHMComm/lib/opus-1.1/silk/float/encode_frame_FLP.c:116: undefined reference to `silk_LP_variable_cutoff'
opus/libsilk_float.a(pitch_analysis_core_FLP.c.o): In function `silk_pitch_analysis_core_FLP':
xxx/OHMComm/lib/opus-1.1/silk/float/pitch_analysis_core_FLP.c:141: undefined reference to `silk_resampler_down2'
xxx/OHMComm/lib/opus-1.1/silk/float/pitch_analysis_core_FLP.c:148: undefined reference to `silk_resampler_down2_3'
xxx/OHMComm/lib/opus-1.1/silk/float/pitch_analysis_core_FLP.c:157: undefined reference to `silk_resampler_down2'
opus/libsilk_float.a(wrappers_FLP.c.o): In function `silk_A2NLSF_FLP':
xxx/OHMComm/lib/opus-1.1/silk/float/wrappers_FLP.c:50: undefined reference to `silk_A2NLSF'
opus/libsilk_float.a(wrappers_FLP.c.o): In function `silk_process_NLSFs_FLP':
xxx/OHMComm/lib/opus-1.1/silk/float/wrappers_FLP.c:83: undefined reference to `silk_process_NLSFs'
opus/libsilk_float.a(wrappers_FLP.c.o): In function `silk_NSQ_wrapper_FLP':
xxx/OHMComm/lib/opus-1.1/silk/float/wrappers_FLP.c:163: undefined reference to `silk_NSQ_del_dec'
xxx/OHMComm/lib/opus-1.1/silk/float/wrappers_FLP.c:166: undefined reference to `silk_NSQ'
opus/libsilk_float.a(wrappers_FLP.c.o): In function `silk_quant_LTP_gains_FLP':
xxx/OHMComm/lib/opus-1.1/silk/float/wrappers_FLP.c:196: undefined reference to `silk_quant_LTP_gains'
opus/libsilk_float.a(find_LPC_FLP.c.o): In function `silk_find_LPC_FLP':
xxx/OHMComm/lib/opus-1.1/silk/float/find_LPC_FLP.c:73: undefined reference to `silk_interpolate'
We already have a working but not used RTCP-implementation.
Create Profiler for callback-method:
Implement usage of FLAC codec as AudioProcessor
Set number of channels to 2 for stereo:
Processors can't negotiate an AudioFormat if one AudioProcessor provides only AUDIO_FORMAT_SINT16 or AUDIO_FORMAT_SINT8 or AUDIO_FORMAT_SINT24 or AUDIO_FORMAT_SINT32 or AUDIO_FORMAT_FLOAT64 it only works with AUDIO_FORMAT_FLOAT32 and of course with AUDIO_FORMAT_ALL.
This affects issue #18 , Code base 7fc2e64
improve modularity and clarity of audio-processor-chain by using a list
Setup CppTest in order to write unit tests
Implement simple audio output to wave file streamer
-http://www3.nd.edu/~dthain/courses/cse20211/fall2013/wavfile/
Allow for non-interactive program run by adding parameters to the command line.
Requirements:
Commit 484e5d9
Is not compiling because winsock2.h is included more than one time.
It is included in
Write simple UDP-wrapper for to write/receive audio
Travis-CI seem to have granted us Mac OS X compilation without any notice.
For the compilation to work under Mac OS X, the travis-script must be modified (there is no 'sudo apt-get ...' for mac)
Please try to use the C++11 standard in order to have consistent code.
Also try to avoid C-Code for example "malloc, free" etc.
If the rtaudio Bit Mask is 16 it only prints RTAUDIO_FLOAT32, i assume it should print RTAUDIO_SINT16, RTAUDIO_SINT24 and RTAUDIO_FLOAT32.
I think the error is that the 16 is interpreted as an decimal(10000 binary) number but should be interpreted as an hexadecimal number 0x16(10110 binary).
Commit 9cbfe8a broke tests under Linux. Output as follows:
TestAudioIO: 0/2
RtApiAlsa::closeStream(): no open stream to close!
TestAudioIO: 2/2, 100% correct in 0.012452 seconds
Total: 2 tests, 100% correct in 0.012452 seconds
*** Error in `/home/daniel/workspace/OHMComm/build/test/Tests': free(): corrupted unsorted chunks: 0x0000000001d42840 ***
*** Error in `/home/daniel/workspace/OHMComm/build/test/Tests': malloc(): memory corruption: 0x0000000001d40590 ***
RUN FINISHED; Terminated; real time: 4s; user: 0ms; system: 0ms
Did you change anything with malloc/free or buffers in or around AudioHandler?
P.S. The TestAudioIO should be renamed.
Write method to automatically select best frame-size!
Since there has been major changes in the project structure it is necessary to write a documentation. Also refactoring might be useful.
Write useful UnitTests.
We need to write extensive tests for:
Inorder to write useful UnitTests it necessary to write testable methods and classes. Consider this while developing.
Implement RTP jitter buffer, supporting multithreaded read/write.
More precisly: Support one write-thread and one thread reading packages.
The buffer should return some kind of silent-package if its contents are empty.
Provide an interface of public methods for both threads
Find and use an implementation for the Opus audio codec (http://www.opus-codec.org/).
Implement as AudioProcessor
add minimum number of buffered package before playing audio
Write a NetworkWrapper
P.S. Maybe NetworkWrapper is not such a good name, rename it to something like IOWrapper or AudioIO, ...
Implement a thread listening on a socket, and writing RTPPackages into RTPBuffer
Modify cmake to automatically call ./configure for libraries (for linux, mac)
Add support for ipv6 addresses.
Implement as Adapter on top of socket.
Links
Wrap RtAudio into a Adapter, allowing to extend OHMComm to be based on different libraries, e.g. Portaudio (http://www.portaudio.com/).
This Adapter must provide following methods:
Implement Device configuration with rtaudio
Write a function to select and add AudioProcessors to the chain.
Note: The order in which the Processors are being added is important and should be made recognizable to the user.
We need some mechanism to stop the AudioHandler and its thread other than exiting the main-method.
This would fix #47
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.