You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
enc, err:=audioformats.NewOpusEncoder(audioformats.OPUS_SAMPLE_RATE, audioformats.OPUS_CHANNELS, audioformats.OPUS_APPLICATION) // initializes a new encoder
43
43
iferr!=nil {
44
-
logger.Errorf("Could not create Opus Encoder. End Track\n") //TODO break and raise done/exception event with error paramter or whatsoever
44
+
logger.Errorf("Could not create Opus Encoder. End Track\n") //TODO break and raise done/exception event with error parameter or whatsoever
logger.Fatalf("Error writing to tls connection\n")
87
87
}
88
88
ifn<len(all) {
89
-
logger.Fatalf("Weniger geschrieben als gedacht\n")
89
+
logger.Fatalf("Did not write as much as expected\n")
90
90
}
91
91
} else {
92
92
// encrypt ocb2-aes
93
93
varallencrypted []byte=make([]byte, len(all)-2) //ocb2 overhead is always 4 byte, but for UDP we don't need 2 bytes package type and 4 bytes package length (4-2-4 = -2)
logger.Debugf("Hier IST DAS MUHAHAHAH, body length: %d, readed: %d, to read: %d, already readed: %d, %v\n", s.httpResp.ContentLength, n, len(p), s.cposition, err)
43
+
logger.Warnf("Got Error while reading from http Response of youtube stream. Trying to connect again..., body length: %d, readed: %d, to read: %d, already readed: %d, %v\n", s.httpResp.ContentLength, n, len(p), s.cposition, err)
44
44
// try to "reconnect" (just request the remaining audiodata again)
45
45
err=s.RequestNext()
46
46
// here we will return 0 data even though there is still data left (so keep in mind that this function does not always return len(p) audiodata)
// The following loop is for trying up to 3 times to download the youtube page and find a specific json string in it. You might not believe but it doesn't always work on the first try...
Copy file name to clipboardExpand all lines: gomble/audiosources/youtube/youtubevideo.old.go
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ package youtube
9
9
//
10
10
// "gomble/logger"
11
11
//)
12
-
//// after much time spent in trial and error I found out that youtube-dl does seem to ignore any kind of paramter if output is set to stdout (-o -), altough I can't find any of this in the documentation. Furthermore most problems I got had their origin in using youtube-dl for downloading the video/audio. It's safer to use youtube-dl only as plain donwloading and outputing to stdout of anything it can find under this url:
12
+
//// after much time spent in trial and error I found out that youtube-dl does seem to ignore any kind of parameter if output is set to stdout (-o -), although I can't find any of this in the documentation. Furthermore most problems I got had their origin in using youtube-dl for downloading the video/audio. It's safer to use youtube-dl only as plain downloading and outputting to stdout of anything it can find under this url:
13
13
//// youtube-dl -o - --rm-cache-dir --quiet {url}
14
14
//
15
15
//// -i - takes the input of stdin
@@ -102,7 +102,7 @@ package youtube
102
102
// // we didn't got enough data, is ffmpeg and youtube-dl done?
103
103
// select {
104
104
// case _ = <- y.done:
105
-
// // Check if any problems occured with youtube-dl
105
+
// // Check if any problems occurred with youtube-dl
106
106
// if !y.ycmd.ProcessState.Success() {
107
107
// return nil, errors.New("Could not complete youtube-dl command with url: " + y.url + " stderr: " + y.ycmdError.String())
Copy file name to clipboardExpand all lines: gomble/eventhandler.go
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ var tlsconfig tls.Config
28
28
// audioConn is our udp connection to the server. It is used by audiopackagereader.go to read packages from mumble-server and by audiopackagewriter to write packages to the mumble-server
29
29
varaudioConn*net.UDPConn
30
30
31
-
// Adress and port of mumble-server in syntax address:port
31
+
// Address and port of mumble-server in syntax address:port
32
32
varaddrstring
33
33
34
34
// Initializes some settings for gomble and returns an Eventhandler which can be used to add event-listeners
@@ -70,9 +70,9 @@ func Begin() {
70
70
logger.Fatalf("Sending Version failed: "+err.Error() +"\n")
0 commit comments