Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Commit

Permalink
Merge pull request #12 from adct-the-experimenter/audio_decode_change
Browse files Browse the repository at this point in the history
Audio decode change
  • Loading branch information
adct-the-experimenter authored Aug 18, 2023
2 parents d14a940 + 5846822 commit 034cbd9
Show file tree
Hide file tree
Showing 13 changed files with 22,181 additions and 307 deletions.
23 changes: 3 additions & 20 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ find_library(pugixml_LIBRARIES NAMES pugixml)

#For the shared library:

set ( PROJECT_LINK_LIBS raylib openal sndfile ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${pugixml_LIBRARIES})
set ( PROJECT_LINK_LIBS raylib openal ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${pugixml_LIBRARIES})
#where to find library files .so
link_directories( /usr/lib /usr/local/lib )

Expand Down Expand Up @@ -57,31 +57,14 @@ set(SOURCES src/main.cpp
src/reverb-zone.cpp
src/effect-zone.cpp
src/effects-manager.cpp
#src/soundproducer-track-manager.cpp
#src/soundproducer-track.cpp
#src/listener-track.cpp
src/soundproducer-registry.cpp
src/immediate_mode_sound_player.cpp src/sound_bank.cpp
src/CreateSoundProducerDialog.cpp src/EditMultipleSoundProducersDialog.cpp
src/Change-HRTF-Dialog.cpp src/HRTF-Test-Dialog.cpp
src/EditListenerDialog.cpp
#src/setup-serial-dialog.cpp
#src/listener-external.cpp

src/openalsoftaudioengine.cpp src/soundproducer.cpp src/listener.cpp
#src/external-orientation-device-serial.cpp

#src/timeline-track-editor/src/timeline-frame.cpp
#src/timeline-track-editor/src/timeline-window.cpp
#src/timeline-track-editor/src/playback-controls.cpp
#src/timeline-track-editor/src/stereo-audio-track.cpp
#src/timeline-track-editor/src/mono-audio-track.cpp
#src/timeline-track-editor/src/audio-track.cpp
#src/timeline-track-editor/src/audio-graph.cpp
src/timeline-track-editor/src/audio-stream-container.cpp
src/timeline-track-editor/src/openalsoft-player.cpp
#src/timeline-track-editor/src/double-track.cpp
#src/timeline-track-editor/src/editor-graph.cpp
#src/timeline-track-editor/src/track.cpp
src/backends/openalsoft-player-drwav.cpp
)

#get_cmake_property(_variableNames VARIABLES)
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ Features from binaural-audio-editor will be ported to 3d audio producer.

- raylib 4.2

- libsndfile http://www.mega-nerd.com/libsndfile/

- Boost Math Quaternion headers and Boost ASIO serial https://www.boost.org/users/history/version_1_70_0.html

- PugiXML https://github.com/zeux/pugixml/
Expand Down Expand Up @@ -164,6 +162,11 @@ archive(.e.g .zip, .gz, etc.)
### Saving a project
1. Click on 'Save Project' button.

## Important Details to Know
- 3D Audio Producer works with a copy of the audio data for audio files that are uploaded to sound bank.
The sound format that his copy of audio data uses is a signed 32-bit integer format.
This is done to prevent corruption of audio files.

## Feedback

Please email questions or comments to this email address bringerofawesomefood @ gmail . com without spaces.
62 changes: 15 additions & 47 deletions docs/overview-of-systems.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,29 @@
# Overview of Systems in Binaural Audio Editor
# Overview of Systems in 3D Audio Producer

These are the main three systems that binaural audio editor interfaces with.
These are the main three systems that 3D Audio Producer interfaces with.
- Main Graphical User Interface, GUI
- OpenAL Soft Audio Engine
- Timeline Track Editor
- Sound Bank
- Immediate Mode Sound Player
- OpenALSoftAudioEngine

## Main Graphical User Interface, GUI
This is what puts together everything seen in binaural audio editor.
This is what puts together everything seen in 3D Audio Producer.


### Files to look at:
- `osgViewerWX.h`
- `osgViewerWX.cpp`
- `SoundProducerTrackManager.h`
- `SoundProducerTrackManager.cpp`
- Files with Dialog in the filename in include and src folder.
- `main_gui_editor.h`
- `main_gui_editor.cpp`

#### In`osgViewerWX.cpp` and `osgViewerWX.h`
## Sound Bank
Performs audio decoding and stores audio data into files

**OsgCanvas** is a class to show the OpenSceneGraph window and 3D objects.
## Immediate Mode Sound Player
Manages audio playback.

**GraphicsWindowWX** is a class that contains OsgCanvas and contains the rendering output in a window.

**MainFrame** is the window that contains the menu bar above and its items, contains the timeline editor, and opens dialogs/windows when a menu item is clicked on.

Since it is the main part that user interacts with, MainFrame also contains important classes such as TimelineFrame, reference to OpenALSoftAudioEngine, reference to Listener, SoundProducerTrackManager, vector of SoundProducerTrack, ListenerTrack.

**wxOsgApp** is the main of the wxWidgets appplication, much like the main of a basic C++ program. It contains MainFrame and initializes it.

#### In`SoundProducerTrackManager.cpp` and `SoundProducerTrackManager.h`

**SoundProducerTrackManager** is a class that handles multiple sound producer tracks, buffers the audio, and plays the audio of sound producer tracks in sync.
### Files to look at:
- `immediate_mode_sound_player.h`
- `immediate_mode_sound_player.cpp`

## OpenALSoftAudioEngine
This is a class to abstract 3D audio operations involving OpenAL Soft.
Expand All @@ -41,28 +34,3 @@ It is mostly just used to initialize the OpenAL system and query and test HRTF s
- `openalsoftaudioengine.h`
- `openalsoftaudioengine.cpp`

## Timeline Track Editor
This is a very big important module that is used by binaural audio editor.

It is imported from Timeline Track Editor github https://github.com/adct-the-experimenter/timeline-track-editor.

This module is contained in its own folder in src/timeline-track-editor.

The timeline track editor module contains many important classes such as Track, DoubleTrack, StereoAudioTrack, and TimelineFrame. This is the module to edit to improve the tracks and timeline and see how audio gets buffered.

**Without the Timeline Track Editor module, there would not be a listener track, soundproducer track, or even a timeline for playing audio!**

The reasons this is developed into its own separate project:
- It is very big.
- It is functional apart from binaural audio editor.
- It is much easier and cleaner to edit it as its own project rather than inside binaural audio editor.

### Files to look at
- `src/timeline-track-editor/include/timeline-frame.h`
- `src/timeline-track-editor/src/timeline-frame.cpp`
- `src/timeline-track-editor/include/openalsoft-player.h`
- `src/timeline-track-editor/src/openalsoft-player.cpp`
- `src/timeline-track-editor/include/double-track.h`
- `src/timeline-track-editor/src/double-track.cpp`
- `src/timeline-track-editor/include/stereo-audio-track.h`
- `src/timeline-track-editor/src/stereo-audio-track.cpp`
Loading

0 comments on commit 034cbd9

Please sign in to comment.