AmmosSource
guix
Last change
on this file since 1e781ba was 1e781ba, checked in by recknagel <recknagel@…>, 3 years ago |
former radardex-project
|
-
Property mode
set to
100644
|
File size:
886 bytes
|
Line | |
---|
1 | from AmmosAudioSocketReader import AmmosAudioSocketReader
|
---|
2 |
|
---|
3 | import math
|
---|
4 | import os
|
---|
5 | import socket
|
---|
6 | from collections import deque
|
---|
7 |
|
---|
8 | import numpy as np
|
---|
9 | import scipy.io.wavfile as wavfile
|
---|
10 |
|
---|
11 | from AmmosGlobalFrameBody import AmmosGlobalFrameBody
|
---|
12 | from AmmosAudioDataHeader import AmmosAudioDataHeader
|
---|
13 | from AmmosExtendedAudioDataHeader import AmmosExtendedAudioDataHeader
|
---|
14 | from AmmosGlobalFrameHeader import AmmosGlobalFrameHeader
|
---|
15 | from AmmosSingleFrame import AmmosSingleFrame
|
---|
16 | from AmmosContainer import AmmosContainer
|
---|
17 |
|
---|
18 |
|
---|
19 | in_socket = socket.socket()
|
---|
20 | in_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
---|
21 | in_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1)
|
---|
22 | in_socket.bind(('127.0.0.1', 12345))
|
---|
23 | in_socket.listen(1)
|
---|
24 | conn, _ = in_socket.accept()
|
---|
25 | print('Connected')
|
---|
26 |
|
---|
27 | socket_reader = AmmosAudioSocketReader(conn)
|
---|
28 |
|
---|
29 | print('Reading Frames')
|
---|
30 | while True:
|
---|
31 | socket_reader.read_next_frame()
|
---|
Note:
See
TracBrowser
for help on using the repository browser.