2018-12-04 01:38:54

There were a few people using the DLL packaged with TDV called BPCSharedComponent.dll.

This DLL gives you DirectSound and DirectSound3d, as well as Ogg Vorbis playback and DirectInput support. I'm writing here to let you know I've made significant changes to the DLL.

First, it now includes a new static class, BPCSharedComponent.Input.DXInput. This class has many methods for dealing with DirectInput from the keyboard and with a joystick.

Next, I rewrote major parts of the Ogg Vorbis player in BPCSharedComponent.ExtendedAudio.OggBuffer. This class now uses DirectSound and no longer uses XAudio2. This means that you no longer need XNA as a dependency for this DLL.

Finally, The DLL now links against SharpDX 4.2 as opposed to 4.0.

The binary version of the DLL isn't released yet since I'll be releasing it as part of the TDV binary push later on, but the new source code which you can compile is here: https://github.com/munawarb/Three-D-Vel … Component/

Thumbs up +2

2018-12-04 07:18:07

Is there any way you can write documentation for this component? If you don't want to, I'd be happy to do so.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.

Thumbs up

2018-12-04 21:57:42

Yes please. It needs proper documentation. And for the love of God don't use it with BGT.

Thumbs up

2018-12-04 23:00:47

@3, you can't use it with BGT, its a .NET assembly.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.

Thumbs up

2018-12-04 23:08:31 (edited by Munawar 2018-12-04 23:09:43)

I do plan to document it at some point. A lot of the methods already have documentation but a whole host of them don't.

It won't work with BGT even if someone tried. It's a .NET dll and links against other .NET assemblies like SharpDX.

Thumbs up

2018-12-05 22:36:59

oo! awesome!

thanks @ for the dllMunawar.

A small question, have a implementation for the new apis of xaudio compatible with hrtf? or only the old direct3d for multichannel support smile

¡thanks!

Thumbs up

2018-12-06 02:13:54

Hi @sanslash332, I used to use XAudio for Ogg Vorbis playback but have been wanting to move away from it for a long time because XNA is deprecated by Microsoft. So the DLL uses DirectSound and DirectSound3D and does not use XAudio at all.

Thumbs up

2018-12-06 04:19:50

hello Muna,

I was talking about xaudio2-7 or abobe ,that are the implementations of xaudio for directx 11 and abobe, used in windows 10 or other things.

These support hrtf, and other things smile

Thumbs up

2018-12-07 00:40:14

No.

Thumbs up

2018-12-08 03:16:42

I've released TDV 2.24 which includes the new BPCSharedComponent.dll. You can get it here: https://github.com/munawarb/Three-D-Vel … ponent.dll

Developer documentation is a work in progress but most of the methods are self-explanatory. I'm writing xml comments and plan to use a doc tool to generate some cool documentation eventually, but for now you can see the documentation in the source code.

Thumbs up

2018-12-10 13:53:27

Hi Munawar and others.
Would it be possible to make / generate a wrapper for this dll in in python, so we could use the functionality from this dll in Python?
- NIcklasMCHD

I'm me. Just me. No one else. Only meeee!

Thumbs up

2018-12-10 14:55:23

Hello,
At 11, you can use it with iron python if you would like to use it with python. I've tested the dll and it works. Just put the dll in ironpython27/dlls directory; you will be able to import and use it like any other python module easily.

Thumbs up

2018-12-11 12:08:41

Hello,
I tried to use the dll like this:
Sound.PlaySound3d(source,False,False,1,0,0)
But I got an error saying no such interface supported. Could you please help me a bit? I don't understand what I'm missing.

Thumbs up

2018-12-11 18:46:55

Hi,
Make sure the sound is in mono. Other than that, I can't see anything wrong with your implementation.

Thumbs up

2018-12-12 05:36:23

Hello,
Actually the DSound.PlaySound(source,False,False) works, but the PlaySound3d doesn't work with the same sound.

Thumbs up

2018-12-12 08:03:02

Make sure you do use loadSound3d not the normal loadSound function
And munawar, I couldn't find sharpDX.input or whatever that is so the dll failes to work. I even downloaded tdv's sourcecode again but it wasn't there either

Add me on skype: kianoosh.shakeri2
Or follow me on twitter @kianoosh shakeri

2018-12-12 08:37:58

Hello,
Ah. That's why it wasn't working.
To get the latest dll package, download the binaries from Munawar's tdv repo. You will get all the dll files you need from there.

Thumbs up

2018-12-12 09:35:47

I really want to use this from the normal python.

I'm me. Just me. No one else. Only meeee!

Thumbs up

2018-12-12 15:04:25

Nicklas consider checking the pythonnet library package. And, meh! I have to get byneries, God they're so big lol

Add me on skype: kianoosh.shakeri2
Or follow me on twitter @kianoosh shakeri

2018-12-12 15:35:21 (edited by kianoosh 2018-12-12 15:35:52)

Ok something's wrong. As munawar said this version of BPC shared component is using sharp DX version 4.2.0 but when i try to compile with that version of sharp DX it  says BPC shared component is using sharp dx v 3.1.0. My dll has a size of 48 kb. Is this the correct one? I got it from the page munawar posted in the post 10.

Add me on skype: kianoosh.shakeri2
Or follow me on twitter @kianoosh shakeri

2018-12-12 16:22:37 (edited by nathon 2018-12-12 16:25:37)

Hi,
At first I also used that post 10 link, but somehow I think that dll is actually the old dll. So what I did was to just download tdv again, (not the source code)- just the executable players would want to get. Then, I copied all the dlls  from there in a folder. Then I could easily use the dll from python. Like this:
import clr
clr.AddReference("System.Windows.Forms")
import BPCSharedComponent as engine
from System.Windows.Forms import Form, Application
GameWindow = Form()
GameWindow.Text=" my game"
GameWindow.Name="MainWindow"
sound=engine.ExtendedAudio.DSound()
sound.initialize(GameWindow.Handle,"c:\\ironpython27")
source=sound.LoadSound3d("tone.wav")
sound.PlaySound3d(source,False,False,1,0,0)
Application.Run(GameWindow)
They are big, but they worth every second spent in getting them lol

Thumbs up

2018-12-12 16:38:58

Hi,
If you download the source and build the BPCSharedComponent package, it'll pull in all the dlls it needs. I'm using NuGet to get SharpDX, so just build the BPCSharedComponent project and you'll be good to go. You don't need to download the binaries smile

Thumbs up

2018-12-12 17:00:25

Don't use python 2 or iron python, use python 3. Please! big_smile

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.

Thumbs up

2018-12-12 17:15:46

Hello,
But python 3 doesn't let me install pythonnet
smile

Thumbs up

2018-12-12 20:02:05

It does. I've pip freeze'd my pip install, here are all the packages I have on my Python install. Pick and choose:
absl-py==0.6.1
agate==1.6.1
agate-dbf==0.2.0
agate-excel==0.2.2
agate-sql==0.5.3
aiohttp==3.4.4
alabaster==0.7.12
altgraph==0.16.1
aniso8601==4.0.1
ansi==0.1.3
AnyQt==0.0.10
argon2-cffi==18.3.0
args==0.1.0
asn1crypto==0.24.0
astor==0.7.1
async-timeout==3.0.1
atom==0.4.1
atomicwrites==1.2.1
attrs==18.2.0
audiogen==0.1.2
audiolazy==0.6
audioread==2.1.6
Automat==0.7.0
awscli==1.16.47
Babel==2.6.0
backcall==0.1.0
bcrypt==3.1.4
beautifulsoup4==4.6.3
beets==1.4.7
bimpy==0.0.11
bleach==3.0.2
blurb==1.0.7
boto3==1.9.37
botocore==1.12.37
bottle==0.12.13
BTrees==4.5.1
cachetools==2.1.0
certifi==2018.10.15
cffi==1.11.5
chardet==3.0.4
Click==7.0
clint==0.5.1
cocos2d==0.6.5
colorama==0.4.0
colorlog==3.1.4
commonmark==0.8.1
configobj==5.0.6
constantly==15.1.0
cookies==2.2.1
coverage==4.5.1
cppimport==18.11.8
cryptography==2.3.1
cssselect==1.0.3
csvkit==1.0.3
cycler==0.10.0
Cython==0.29
dbfread==2.0.7
decorator==4.3.0
defusedxml==0.5.0
Dejavu==1.5.0
dictionaries==0.0.1
dill==0.2.8.2
discord==0.0.2
discord.py==0.16.12
dnspython==1.15.0
dnspython3==1.15.0
docutils==0.14
dopy==0.3.7
EbookLib==0.17
ecdsa==0.13
eliot==1.5.0
enaml==0.10.2
entrypoints==0.2.3
errbot==5.2.0
et-xmlfile==1.0.1
eyeD3==0.8.7
fedex==2.4.0
feedparser==5.2.1
flake8==3.6.0
Flask==1.0.2
Flask-RESTful==0.3.6
Flask-SQLAlchemy==2.3.2
future==0.17.1
futures==3.1.1
gast==0.2.0
geographiclib==1.49
geopy==1.17.0
glfw==1.7.0
gnupg==2.3.1
google-api-core==1.5.1
google-api-python-client==1.7.4
google-auth==1.5.1
google-auth-httplib2==0.0.3
google-cloud-bigquery==1.6.0
google-cloud-bigquery-datatransfer==0.1.1
google-cloud-bigtable==0.31.0
google-cloud-container==0.1.1
google-cloud-core==0.28.1
google-cloud-datastore==1.7.1
google-cloud-dns==0.29.0
google-cloud-error-reporting==0.30.0
google-cloud-firestore==0.30.0
google-cloud-language==1.1.0
google-cloud-logging==1.8.0
google-cloud-monitoring==0.30.1
google-cloud-pubsub==0.38.0
google-cloud-resource-manager==0.28.1
google-cloud-runtimeconfig==0.28.1
google-cloud-spanner==1.6.0
google-cloud-speech==0.36.0
google-cloud-storage==1.13.0
google-cloud-trace==0.19.0
google-cloud-translate==1.3.1
google-cloud-videointelligence==1.5.0
google-cloud-vision==0.34.0
google-resumable-media==0.3.1
googleapis-common-protos==1.5.5
goslate==1.5.1
greenlet==0.4.15
grpc-google-iam-v1==0.11.4
grpcio==1.16.0
hashids==1.2.0
hmmlearn==0.2.1
html5lib==1.0.1
httplib2==0.11.3
httptools==0.0.11
hvac==0.7.0
hyperlink==18.0.0
id3reader==1.53.20070415
idna==2.7
idna-ssl==1.1.0
imagesize==1.1.0
imgui==0.1.0
incremental==17.5.0
ipykernel==5.1.0
ipython==7.1.1
ipython-genutils==0.2.0
isbn-hyphenate==1.0.4
isbnlib==3.9.3
isbntools==4.3.17
iso8601==0.1.12
isodate==0.6.0
itsdangerous==1.1.0
jdcal==1.4
jedi==0.13.1
jellyfish==0.6.1
Jinja2==2.10
jmespath==0.9.3
jsonify==0.5
jsonpickle==1.0
jsonschema==2.6.0
jupyter-client==5.2.3
jupyter-core==4.4.0
keyring==16.0.0
kiwisolver==1.0.1
leather==0.3.3
libaudioverse==0.9.1
Logbook==1.4.1
lupa==1.7
lxml==4.2.5
m3u8==0.3.6
macholib==1.11
Mako==1.0.7
mamba==0.10
Markdown==3.0.1
markdown2==2.3.6
MarkupSafe==1.0
marshmallow==2.16.3
matplotlib==3.0.1
mccabe==0.6.1
Menu==3.2.0
menu3==1.0
meson==0.48.1
mfa==0.1.1
mingus==0.5.1
mistune==0.8.4
mock==2.0.0
MonkeyType==18.8.0
more-itertools==4.3.0
multidict==4.4.2
munkres==1.0.12
musicbrainzngs==0.6
mutagen==1.41.1
mysql-connector-python==8.0.13
nbconvert==5.4.0
nbformat==4.4.0
numpy==1.15.3
onetimepass==1.0.1
openpyxl==2.5.9
packaging==18.0
pandocfilters==1.4.2
parsedatetime==2.4
parso==0.3.1
passlib==1.7.1
pathlib==1.0.1
pbr==5.1.0
pefile==2018.8.8
persistent==4.4.3
pickleshare==0.7.5
prometheus-client==0.4.2
prompt-toolkit==2.0.7
protobuf==3.6.1
psutil==5.4.8
pyasn1==0.4.4
pyasn1-modules==0.2.2
pybind11==2.2.4
pycodestyle==2.4.0
pycparser==2.19
pyflakes==2.0.0
pyglet==1.3.2
Pygments==2.2.0
pygments-markdown-lexer==0.1.0.dev39
PyHamcrest==1.9.0
PyInstaller==3.4
PyOpenAL==0.7.5a1
pyOpenSSL==18.0.0
pyparsing==2.3.0
pyreadline==2.1
pyrsistent==0.14.5
PySDL2==0.9.6
python-dateutil==2.7.5
python-digitalocean==1.14.0
python-docs-theme==2018.7
python-magic==0.4.15
python-slugify==1.2.6
pythonnet==2.4.0.dev0
pytimeparse==1.1.8
pytz==2018.7
pywin32==224
pywin32-ctypes==0.2.0
PyYAML==3.13
pyzmq==17.1.2
QtPy==1.5.2
requests==2.20.0
retype==17.12.0
rocket-errbot==1.2.5
rsa==4.0
s3transfer==0.1.13
scikit-learn==0.20.0
scipy==1.1.0
Send2Trash==1.5.0
service-identity==17.0.0
six==1.11.0
snowballstemmer==1.2.1
Sphinx==1.8.2
sphinxcontrib-websupport==1.1.0
SQLAlchemy==1.2.13
suds-jurko==0.6
testpath==0.4.2
tornado==5.1.1
traitlets==4.3.2
Twisted==18.9.0
typed-ast==1.1.0
Unidecode==1.0.22
uritemplate==3.0.0
urllib3==1.24.1
waitress==1.1.0
wcwidth==0.1.7
webencodings==0.5.1
WebOb==1.8.3
websockets==7.0
WebTest==2.0.32
Werkzeug==0.14.1
WMI==1.4.9
xlrd==1.1.0
xxhash==1.3.0
Yapsy==1.12.0
yarl==1.2.6
zope.interface==4.6.0
You can install any of these by excluding the version number (prefixed by ==). Or you could get these exact versions by just pasting them into pips install command, like so:
pip install Click==7.0
I don't use most of these, as most of them are dependencies. for other modules. However, I do use some, like hvac (for accessing HashiCorp Vault instances), twisted for networking, and so on.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.

Thumbs up